Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Unified Diff: test/cctest/test-flags.cc

Issue 23621044: Revert "Add flags to force or prevent setting of isolate.is_memory_constrained." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698