| Index: test/cctest/test-parsing.cc
|
| diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
|
| index bdc6dc380fed12ca8b830a54e8f5eaab69855b7b..0029669c8d83bf7a18df9252b0b3c3b09a67a912 100644
|
| --- a/test/cctest/test-parsing.cc
|
| +++ b/test/cctest/test-parsing.cc
|
| @@ -7091,6 +7091,27 @@ TEST(DestructuringAssignmentNegativeTests) {
|
| };
|
| RunParserSyncTest(empty_context_data, ambiguity_data, kError, NULL, 0,
|
| always_flags, arraysize(always_flags));
|
| +
|
| + // Strict mode errors
|
| + const char* strict_context_data[][2] = {{"'use strict'; ", " = {}"},
|
| + {"'use strict'; for (", " of {}) {}"},
|
| + {"'use strict'; for (", " in {}) {}"},
|
| + {NULL, NULL}};
|
| + const char* strict_data[] = {"{ eval }",
|
| + "{ arguments }",
|
| + "{ foo: eval }",
|
| + "{ foo: arguments }",
|
| + "{ eval = 0 }",
|
| + "{ arguments = 0 }",
|
| + "{ foo: eval = 0 }",
|
| + "{ foo: arguments = 0 }",
|
| + "[ eval ]",
|
| + "[ arguments ]",
|
| + "[ eval = 0 ]",
|
| + "[ arguments = 0 ]",
|
| + NULL};
|
| + RunParserSyncTest(strict_context_data, strict_data, kError, NULL, 0,
|
| + always_flags, arraysize(always_flags));
|
| }
|
|
|
|
|
|
|