Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index e8ec59942c903509504c00bafd4babc1e6f0f65f..006b391725a2b13648a730be3e573b848264b21e 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -5548,6 +5548,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}}; |