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

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

Issue 811593004: Revert of ES6 computed property names (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 | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/harmony/computed-property-names.js » ('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 f08f9b31d901eb4c1b0483d4f2426d8437a8104f..ef6b5d30c497550b5536b5831ef4d110fe915ab8 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1358,8 +1358,7 @@
kAllowHarmonyObjectLiterals,
kAllowHarmonyTemplates,
kAllowHarmonySloppy,
- kAllowHarmonyUnicode,
- kAllowHarmonyComputedPropertyNames
+ kAllowHarmonyUnicode
};
@@ -1386,8 +1385,6 @@
parser->set_allow_harmony_templates(flags.Contains(kAllowHarmonyTemplates));
parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy));
parser->set_allow_harmony_unicode(flags.Contains(kAllowHarmonyUnicode));
- parser->set_allow_harmony_computed_property_names(
- flags.Contains(kAllowHarmonyComputedPropertyNames));
}
@@ -4585,61 +4582,3 @@
always_true_flags, arraysize(always_true_flags),
always_false_flags, arraysize(always_false_flags));
}
-
-
-TEST(ComputedPropertyName) {
- const char* context_data[][2] = {{"({[", "]: 1});"},
- {"({get [", "]() {}});"},
- {"({set [", "](_) {}});"},
- {"({[", "]() {}});"},
- {"({*[", "]() {}});"},
- {"(class {get [", "]() {}});"},
- {"(class {set [", "](_) {}});"},
- {"(class {[", "]() {}});"},
- {"(class {*[", "]() {}});"},
- {NULL, NULL}};
- const char* error_data[] = {
- "1, 2",
- "var name",
- NULL};
-
- static const ParserFlag always_flags[] = {
- kAllowHarmonyClasses,
- kAllowHarmonyComputedPropertyNames,
- kAllowHarmonyObjectLiterals,
- kAllowHarmonySloppy,
- };
- RunParserSyncTest(context_data, error_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
-
- const char* name_data[] = {
- "1",
- "1 + 2",
- "'name'",
- "\"name\"",
- "[]",
- "{}",
- NULL};
-
- RunParserSyncTest(context_data, name_data, kSuccess, NULL, 0,
- always_flags, arraysize(always_flags));
-}
-
-
-TEST(ComputedPropertyNameShorthandError) {
- const char* context_data[][2] = {{"({", "});"},
- {NULL, NULL}};
- const char* error_data[] = {
- "a: 1, [2]",
- "[1], a: 1",
- NULL};
-
- static const ParserFlag always_flags[] = {
- kAllowHarmonyClasses,
- kAllowHarmonyComputedPropertyNames,
- kAllowHarmonyObjectLiterals,
- kAllowHarmonySloppy,
- };
- RunParserSyncTest(context_data, error_data, kError, NULL, 0,
- always_flags, arraysize(always_flags));
-}
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | test/mjsunit/harmony/computed-property-names.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698