12DEFINE_FLAG(
bool, basic_flag,
true,
"Testing of a basic boolean flag.");
17 EXPECT_EQ(
true, FLAG_basic_flag);
18 EXPECT_EQ(
false, FLAG_verbose_gc);
19 EXPECT_EQ(
false, FLAG_print_flags);
22DEFINE_FLAG(
bool, parse_flag_bool_test,
true,
"Flags::Parse (bool) testing");
28 EXPECT_EQ(
true, FLAG_parse_flag_bool_test);
29 Flags::Parse(
"no_parse_flag_bool_test");
30 EXPECT_EQ(
false, FLAG_parse_flag_bool_test);
31 Flags::Parse(
"parse_flag_bool_test");
32 EXPECT_EQ(
true, FLAG_parse_flag_bool_test);
33 Flags::Parse(
"parse_flag_bool_test=false");
34 EXPECT_EQ(
false, FLAG_parse_flag_bool_test);
35 Flags::Parse(
"parse_flag_bool_test=true");
36 EXPECT_EQ(
true, FLAG_parse_flag_bool_test);
38 EXPECT_EQ(
true, FLAG_string_opt_test ==
nullptr);
39 Flags::Parse(
"string_opt_test=doobidoo");
40 EXPECT_EQ(
true, FLAG_string_opt_test !=
nullptr);
41 EXPECT_EQ(0, strcmp(FLAG_string_opt_test,
"doobidoo"));
42 FLAG_string_opt_test =
reinterpret_cast<charp>(0xDEADBEEF);
43 Flags::Parse(
"string_opt_test=foofoo");
44 EXPECT_EQ(
true, FLAG_string_opt_test !=
nullptr);
45 EXPECT_EQ(0, strcmp(FLAG_string_opt_test,
"foofoo"));
47 EXPECT_EQ(
true, FLAG_entrypoint_test !=
nullptr);
48 EXPECT_EQ(0, strcmp(FLAG_entrypoint_test,
"main"));
50 EXPECT_EQ(100, FLAG_counter);
51 Flags::Parse(
"counter=-300");
52 EXPECT_EQ(-300, FLAG_counter);
53 Flags::Parse(
"counter=$300");
54 EXPECT_EQ(-300, FLAG_counter);
DEFINE_FLAG(bool, print_cluster_information, false, "Print information about clusters written to snapshot")
DECLARE_FLAG(bool, show_invisible_frames)
VM_UNIT_TEST_CASE(DirectoryCurrentNoScope)