Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index 2ad657ef3c69eb665360db125f64deaa937082db..5ccd67341666f41dee52964b8b7488238cabf9e5 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -6357,6 +6357,7 @@ TEST(StrongModeFreeVariablesNotDeclared) { |
TEST(DestructuringPositiveTests) { |
i::FLAG_harmony_destructuring = true; |
+ i::FLAG_harmony_computed_property_names = true; |
const char* context_data[][2] = {{"'use strict'; let ", " = {};"}, |
{"var ", " = {};"}, |
@@ -6391,10 +6392,14 @@ TEST(DestructuringPositiveTests) { |
"{'hi' : x = 42}", |
"{var: x}", |
"{var: x = 42}", |
+ "{[x] : z}", |
+ "{[1+1] : z}", |
+ "{[foo()] : z}", |
"{}", |
NULL}; |
// clang-format on |
static const ParserFlag always_flags[] = {kAllowHarmonyObjectLiterals, |
+ kAllowHarmonyComputedPropertyNames, |
kAllowHarmonyDestructuring}; |
RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, |
arraysize(always_flags)); |
@@ -6403,7 +6408,9 @@ TEST(DestructuringPositiveTests) { |
TEST(DestructuringNegativeTests) { |
i::FLAG_harmony_destructuring = true; |
+ i::FLAG_harmony_computed_property_names = true; |
static const ParserFlag always_flags[] = {kAllowHarmonyObjectLiterals, |
+ kAllowHarmonyComputedPropertyNames, |
kAllowHarmonyDestructuring}; |
{ // All modes. |
@@ -6460,6 +6467,7 @@ TEST(DestructuringNegativeTests) { |
"{x : x = (a+)}", |
"{x : x += a}", |
"{m() {} = 0}", |
+ "{[1+1]}", |
NULL}; |
// clang-format on |
RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, |