@@ -34,5 +34,38 @@ TEST(FlutterProjectBundle, BasicPropertiesRelativePaths) {
34
34
EXPECT_EQ (project.icu_path ().filename ().string (), " icudtl.dat" );
35
35
}
36
36
37
+ TEST (FlutterProjectBundle, SwitchesEmpty) {
38
+ FlutterDesktopEngineProperties properties = {};
39
+ properties.assets_path = " foo/flutter_assets" ;
40
+ properties.icu_data_path = " foo/icudtl.dat" ;
41
+
42
+ std::vector<const char *> switches;
43
+ properties.switches = switches.data ();
44
+ properties.switches_count = switches.size ();
45
+
46
+ FlutterProjectBundle project (properties);
47
+
48
+ EXPECT_EQ (project.switches ().size (), 0u );
49
+ }
50
+
51
+ TEST (FlutterProjectBundle, Switches) {
52
+ FlutterDesktopEngineProperties properties = {};
53
+ properties.assets_path = " foo/flutter_assets" ;
54
+ properties.icu_data_path = " foo/icudtl.dat" ;
55
+
56
+ std::vector<const char *> switches;
57
+ switches.push_back (" --abc" );
58
+ switches.push_back (" --foo=\" bar, baz\" " );
59
+
60
+ properties.switches = switches.data ();
61
+ properties.switches_count = switches.size ();
62
+
63
+ FlutterProjectBundle project (properties);
64
+
65
+ EXPECT_EQ (project.switches ().size (), 2u );
66
+ EXPECT_EQ (project.switches ()[0 ], " --abc" );
67
+ EXPECT_EQ (project.switches ()[1 ], " --foo=\" bar, baz\" " );
68
+ }
69
+
37
70
} // namespace testing
38
71
} // namespace flutter
0 commit comments