| Index: test/cctest/test-parsing.cc
|
| diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
|
| index e8ec59942c903509504c00bafd4babc1e6f0f65f..2bd3a699d518d00a83198484c02acd93c914d94a 100644
|
| --- a/test/cctest/test-parsing.cc
|
| +++ b/test/cctest/test-parsing.cc
|
| @@ -2957,6 +2957,36 @@ TEST(StrictDelete) {
|
| }
|
|
|
|
|
| +TEST(NoErrorsDeclsInCase) {
|
| + const char* context_data[][2] = {
|
| + {"'use strict'; switch(x) { case 1:", "}"},
|
| + {"function foo() {'use strict'; switch(x) { case 1:", "}}"},
|
| + {"'use strict'; switch(x) { case 1: case 2:", "}"},
|
| + {"function foo() {'use strict'; switch(x) { case 1: case 2:", "}}"},
|
| + {"'use strict'; switch(x) { default:", "}"},
|
| + {"function foo() {'use strict'; switch(x) { default:", "}}"},
|
| + {"'use strict'; switch(x) { case 1: default:", "}"},
|
| + {"function foo() {'use strict'; switch(x) { case 1: default:", "}}"},
|
| + { nullptr, nullptr }
|
| + };
|
| +
|
| + const char* statement_data[] = {
|
| + "function f() { }",
|
| + "class C { }",
|
| + "class C extends Q {}",
|
| + "function f() { } class C {}",
|
| + "function f() { }; class C {}",
|
| + "class C {}; function f() {}",
|
| + nullptr
|
| + };
|
| +
|
| + static const ParserFlag always_flags[] = {kAllowHarmonyClasses};
|
| +
|
| + RunParserSyncTest(context_data, statement_data, kSuccess, NULL, 0,
|
| + always_flags, arraysize(always_flags));
|
| +}
|
| +
|
| +
|
| TEST(InvalidLeftHandSide) {
|
| const char* assignment_context_data[][2] = {
|
| {"", " = 1;"},
|
|
|