6 #include "gtest/gtest.h"
13 properties.
assets_path = L
"C:\\foo\\flutter_assets";
19 EXPECT_EQ(project.
assets_path().string(),
"C:\\foo\\flutter_assets");
20 EXPECT_EQ(project.
icu_path().string(),
"C:\\foo\\icudtl.dat");
32 EXPECT_EQ(project.
assets_path().filename().string(),
"flutter_assets");
33 EXPECT_TRUE(project.
icu_path().is_absolute());
34 EXPECT_EQ(project.
icu_path().filename().string(),
"icudtl.dat");
43 _putenv_s(
"FLUTTER_ENGINE_SWITCHES",
"");
55 std::vector<const char*> test_arguments = {
"arg1",
"arg2"};
61 std::vector<std::string> retrieved_arguments =
63 EXPECT_EQ(retrieved_arguments.size(), 2U);
64 EXPECT_EQ(retrieved_arguments[0],
"arg1");
65 EXPECT_EQ(retrieved_arguments[1],
"arg2");
68 #ifndef FLUTTER_RELEASE
74 _putenv_s(
"FLUTTER_ENGINE_SWITCHES",
"2");
75 _putenv_s(
"FLUTTER_ENGINE_SWITCH_1",
"abc");
76 _putenv_s(
"FLUTTER_ENGINE_SWITCH_2",
"foo=\"bar, baz\"");
80 std::vector<std::string> switches = project.
GetSwitches();
81 EXPECT_EQ(switches.size(), 2);
82 EXPECT_EQ(switches[0],
"--abc");
83 EXPECT_EQ(switches[1],
"--foo=\"bar, baz\"");
85 #endif // !FLUTTER_RELEASE