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

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

Issue 772823002: Make test-parsing faster: don't run parsing tests with all experimental flag combinations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 0939e08a9fd23dc544a6d4cb8a7ac0f1097174ae..2aa4eaf5cd13e5c623ec8ac7176e89230be2a235 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1673,16 +1673,9 @@ void RunParserSyncTest(const char* context_data[][2],
CcTest::i_isolate()->stack_guard()->SetStackLimit(
i::GetCurrentStackPosition() - 128 * 1024);
+ // Experimental feature flags should not go here; pass the flags as
+ // always_true_flags if the test needs them.
static const ParserFlag default_flags[] = {
- kAllowHarmonyArrowFunctions,
- kAllowHarmonyClasses,
- kAllowHarmonyNumericLiterals,
- kAllowHarmonyObjectLiterals,
- kAllowHarmonyScoping,
- kAllowHarmonyModules,
- kAllowHarmonyTemplates,
- kAllowHarmonySloppy,
- kAllowHarmonyUnicode,
kAllowLazy,
kAllowNatives,
};
@@ -1691,13 +1684,10 @@ void RunParserSyncTest(const char* context_data[][2],
flags = default_flags;
flags_len = arraysize(default_flags);
if (always_true_flags != NULL || always_false_flags != NULL) {
- // Remove always_true/false_flags from default_flags.
+ // Remove always_true/false_flags from default_flags (if present).
CHECK((always_true_flags != NULL) == (always_true_len > 0));
CHECK((always_false_flags != NULL) == (always_false_len > 0));
- CHECK(always_true_flags == NULL || always_true_len < flags_len);
- CHECK(always_false_flags == NULL || always_false_len < flags_len);
- generated_flags =
- new ParserFlag[flags_len - always_true_len - always_false_len];
+ generated_flags = new ParserFlag[flags_len + always_true_len];
int flag_index = 0;
for (int i = 0; i < flags_len; ++i) {
bool use_flag = true;
@@ -1709,7 +1699,6 @@ void RunParserSyncTest(const char* context_data[][2],
}
if (use_flag) generated_flags[flag_index++] = flags[i];
}
- CHECK(flag_index == flags_len - always_true_len - always_false_len);
flags_len = flag_index;
flags = generated_flags;
}
@@ -1899,14 +1888,8 @@ TEST(ErrorsFutureStrictReservedWords) {
NULL
};
- static const ParserFlag always_flags[] = {kAllowHarmonyArrowFunctions};
- RunParserSyncTest(context_data, statement_data, kError, NULL, 0, always_flags,
- arraysize(always_flags));
-
- static const ParserFlag classes_flags[] = {
- kAllowHarmonyArrowFunctions, kAllowHarmonyClasses, kAllowHarmonyScoping};
- RunParserSyncTest(context_data, statement_data, kError, NULL, 0,
- classes_flags, arraysize(classes_flags));
+ RunParserSyncTest(context_data, statement_data, kError);
+ RunParserSyncTest(context_data, statement_data, kError);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698