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

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

Issue 1429653006: Remove flags for spread calls and arrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/preparser.h ('k') | test/js-perf-test/JSTests.json » ('j') | 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 463dc062855a2abe8afdbbf7e91f7b82eabdff75..67a27dbd26537d3b3e73fd2428eb786860c9b511 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1498,9 +1498,7 @@ enum ParserFlag {
kAllowHarmonyRestParameters,
kAllowHarmonySloppy,
kAllowHarmonySloppyLet,
- kAllowHarmonySpreadCalls,
kAllowHarmonyDestructuring,
- kAllowHarmonySpreadArrays,
kAllowHarmonyNewTarget,
kAllowStrongMode,
kNoLegacyConst
@@ -1522,14 +1520,10 @@ void SetParserFlags(i::ParserBase<Traits>* parser,
flags.Contains(kAllowHarmonyDefaultParameters));
parser->set_allow_harmony_rest_parameters(
flags.Contains(kAllowHarmonyRestParameters));
- parser->set_allow_harmony_spread_calls(
- flags.Contains(kAllowHarmonySpreadCalls));
parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy));
parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet));
parser->set_allow_harmony_destructuring(
flags.Contains(kAllowHarmonyDestructuring));
- parser->set_allow_harmony_spread_arrays(
- flags.Contains(kAllowHarmonySpreadArrays));
parser->set_allow_harmony_new_target(flags.Contains(kAllowHarmonyNewTarget));
parser->set_allow_strong_mode(flags.Contains(kAllowStrongMode));
parser->set_allow_legacy_const(!flags.Contains(kNoLegacyConst));
@@ -5358,10 +5352,7 @@ TEST(SpreadCall) {
"...[0, 1, 2], 3, 4, 5, 6, ...'7', 8, 9",
"...[0, 1, 2], 3, 4, 5, 6, ...'7', 8, 9, ...[10]", NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySpreadCalls};
-
- RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
}
@@ -5372,10 +5363,7 @@ TEST(SpreadCallErrors) {
const char* data[] = {"(...[1, 2, 3])", "......[1,2,3]", NULL};
- static const ParserFlag always_flags[] = {kAllowHarmonySpreadCalls};
-
- RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
@@ -6931,8 +6919,6 @@ TEST(DefaultParametersYieldInInitializers) {
TEST(SpreadArray) {
- i::FLAG_harmony_spread_arrays = true;
-
const char* context_data[][2] = {
{"'use strict';", ""}, {"", ""}, {NULL, NULL}};
@@ -6950,15 +6936,11 @@ TEST(SpreadArray) {
"[, , ...a]",
NULL};
// clang-format on
- static const ParserFlag always_flags[] = {kAllowHarmonySpreadArrays};
- RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kSuccess);
}
TEST(SpreadArrayError) {
- i::FLAG_harmony_spread_arrays = true;
-
const char* context_data[][2] = {
{"'use strict';", ""}, {"", ""}, {NULL, NULL}};
@@ -6971,9 +6953,7 @@ TEST(SpreadArrayError) {
"[ (...a)]",
NULL};
// clang-format on
- static const ParserFlag always_flags[] = {kAllowHarmonySpreadArrays};
- RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
- arraysize(always_flags));
+ RunParserSyncTest(context_data, data, kError);
}
« no previous file with comments | « src/preparser.h ('k') | test/js-perf-test/JSTests.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698