Index: test/cctest/test-flags.cc |
diff --git a/test/cctest/test-flags.cc b/test/cctest/test-flags.cc |
index ad25bebd8dc945c13727444db1864aa1d2585b71..9cb12c4787f59995e6807e7cdae2d52fdfa57824 100644 |
--- a/test/cctest/test-flags.cc |
+++ b/test/cctest/test-flags.cc |
@@ -54,18 +54,15 @@ TEST(Flags1) { |
TEST(Flags2) { |
SetFlagsToDefault(); |
- int argc = 8; |
- const char* argv[] = { "Test2", "-notesting-bool-flag", |
- "--notesting-maybe-bool-flag", "notaflag", |
+ int argc = 7; |
+ const char* argv[] = { "Test2", "-notesting-bool-flag", "notaflag", |
"--testing_int_flag=77", "-testing_float_flag=.25", |
"--testing_string_flag", "no way!" }; |
CHECK_EQ(0, FlagList::SetFlagsFromCommandLine(&argc, |
const_cast<char **>(argv), |
false)); |
- CHECK_EQ(8, argc); |
+ CHECK_EQ(7, argc); |
CHECK(!FLAG_testing_bool_flag); |
- CHECK(FLAG_testing_maybe_bool_flag.has_value); |
- CHECK(!FLAG_testing_maybe_bool_flag.value); |
CHECK_EQ(77, FLAG_testing_int_flag); |
CHECK_EQ(.25, FLAG_testing_float_flag); |
CHECK_EQ(0, strcmp(FLAG_testing_string_flag, "no way!")); |
@@ -76,13 +73,10 @@ TEST(Flags2b) { |
SetFlagsToDefault(); |
const char* str = |
" -notesting-bool-flag notaflag --testing_int_flag=77 " |
- "-notesting-maybe-bool-flag " |
"-testing_float_flag=.25 " |
"--testing_string_flag no_way! "; |
CHECK_EQ(0, FlagList::SetFlagsFromString(str, StrLength(str))); |
CHECK(!FLAG_testing_bool_flag); |
- CHECK(FLAG_testing_maybe_bool_flag.has_value); |
- CHECK(!FLAG_testing_maybe_bool_flag.value); |
CHECK_EQ(77, FLAG_testing_int_flag); |
CHECK_EQ(.25, FLAG_testing_float_flag); |
CHECK_EQ(0, strcmp(FLAG_testing_string_flag, "no_way!")); |
@@ -91,9 +85,9 @@ TEST(Flags2b) { |
TEST(Flags3) { |
SetFlagsToDefault(); |
- int argc = 9; |
+ int argc = 8; |
const char* argv[] = |
- { "Test3", "--testing_bool_flag", "--testing-maybe-bool-flag", "notaflag", |
+ { "Test3", "--testing_bool_flag", "notaflag", |
"--testing_int_flag", "-666", |
"--testing_float_flag", "-12E10", "-testing-string-flag=foo-bar" }; |
CHECK_EQ(0, FlagList::SetFlagsFromCommandLine(&argc, |
@@ -101,8 +95,6 @@ TEST(Flags3) { |
true)); |
CHECK_EQ(2, argc); |
CHECK(FLAG_testing_bool_flag); |
- CHECK(FLAG_testing_maybe_bool_flag.has_value); |
- CHECK(FLAG_testing_maybe_bool_flag.value); |
CHECK_EQ(-666, FLAG_testing_int_flag); |
CHECK_EQ(-12E10, FLAG_testing_float_flag); |
CHECK_EQ(0, strcmp(FLAG_testing_string_flag, "foo-bar")); |
@@ -112,14 +104,11 @@ TEST(Flags3) { |
TEST(Flags3b) { |
SetFlagsToDefault(); |
const char* str = |
- "--testing_bool_flag --testing-maybe-bool-flag notaflag " |
- "--testing_int_flag -666 " |
+ "--testing_bool_flag notaflag --testing_int_flag -666 " |
"--testing_float_flag -12E10 " |
"-testing-string-flag=foo-bar"; |
CHECK_EQ(0, FlagList::SetFlagsFromString(str, StrLength(str))); |
CHECK(FLAG_testing_bool_flag); |
- CHECK(FLAG_testing_maybe_bool_flag.has_value); |
- CHECK(FLAG_testing_maybe_bool_flag.value); |
CHECK_EQ(-666, FLAG_testing_int_flag); |
CHECK_EQ(-12E10, FLAG_testing_float_flag); |
CHECK_EQ(0, strcmp(FLAG_testing_string_flag, "foo-bar")); |
@@ -134,7 +123,6 @@ TEST(Flags4) { |
const_cast<char **>(argv), |
true)); |
CHECK_EQ(2, argc); |
- CHECK(!FLAG_testing_maybe_bool_flag.has_value); |
} |
@@ -142,7 +130,6 @@ TEST(Flags4b) { |
SetFlagsToDefault(); |
const char* str = "--testing_bool_flag --foo"; |
CHECK_EQ(2, FlagList::SetFlagsFromString(str, StrLength(str))); |
- CHECK(!FLAG_testing_maybe_bool_flag.has_value); |
} |