| Index: test/cctest/test-parsing.cc
|
| diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
|
| index 12e1fe907ed558ad1564bf92f081521530e9ff84..a519f1a8e04c68d8aa08a1010a6767a70b20b5b2 100644
|
| --- a/test/cctest/test-parsing.cc
|
| +++ b/test/cctest/test-parsing.cc
|
| @@ -5566,6 +5566,36 @@ TEST(StrongForIn) {
|
| }
|
|
|
|
|
| +TEST(StrongSuperCalls) {
|
| + const char* sloppy_context_data[][2] = {{"", ""}, {NULL}};
|
| + const char* strict_context_data[][2] = {{"'use strict';", ""}, {NULL}};
|
| + const char* strong_context_data[][2] = {{"'use strong';", ""}, {NULL}};
|
| +
|
| + const char* data[] = {
|
| + "class C extends Object { constructor() {} }",
|
| + "class C extends Object { constructor() { (super()); } }",
|
| + "class C extends Object { constructor() { (() => super())(); } }",
|
| + "class C extends Object { constructor() { { super(); } } }",
|
| + "class C extends Object { constructor() { if (1) super(); } }",
|
| + "class C extends Object { constructor() { super(), super(); } }",
|
| + "class C extends Object { constructor() { super(); super(); } }",
|
| + "class C extends Object { constructor() { super(); (super()); } }",
|
| + "class C extends Object { constructor() { super(); { super() } } }",
|
| + NULL};
|
| +
|
| + static const ParserFlag always_flags[] = {
|
| + kAllowStrongMode, kAllowHarmonyClasses, kAllowHarmonyObjectLiterals,
|
| + kAllowHarmonyArrowFunctions
|
| + };
|
| + RunParserSyncTest(sloppy_context_data, data, kError, NULL, 0, always_flags,
|
| + arraysize(always_flags));
|
| + RunParserSyncTest(strict_context_data, data, kSuccess, NULL, 0, always_flags,
|
| + arraysize(always_flags));
|
| + RunParserSyncTest(strong_context_data, data, kError, NULL, 0, always_flags,
|
| + arraysize(always_flags));
|
| +}
|
| +
|
| +
|
| TEST(ArrowFunctionASIErrors) {
|
| const char* context_data[][2] = {{"'use strict';", ""}, {"", ""},
|
| {NULL, NULL}};
|
|
|