Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index 91c5baccc77b868e1e87af1c24c74cba46b569e5..c8c0cab3d4c16044b34a462d6a13bcfb2a91c948 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -2912,6 +2912,20 @@ TEST(ErrorsObjectLiteralChecking) { |
// Parsing FunctionLiteral for getter or setter fails |
"get foo( +", |
"get foo() \"error\"", |
+ // Various forbidden forms |
+ "static x: 0", |
+ "static x(){}", |
adamk
2016/08/31 17:37:07
Please add some tests with async (you'll have to a
bakkot
2016/08/31 19:46:28
Done.
|
+ "*x: 0", |
+ "*x", |
+ "*get x(){}", |
+ "*set x(y){}", |
+ "get *x(){}", |
+ "set *x(y){}", |
+ "get x*(){}", |
+ "set x*(y){}", |
+ "x = 0", |
+ "* *x(){}", |
+ "x*(){}", |
NULL |
}; |
@@ -2968,6 +2982,12 @@ TEST(NoErrorsObjectLiteralChecking) { |
"1: 1, set 2(v) {}", |
"get: 1, get foo() {}", |
"set: 1, set foo(_) {}", |
+ // Potentially confusing cases |
+ "*get() {}", |
+ "*set() {}", |
+ "*static() {}", |
+ "get : 0", |
adamk
2016/08/31 17:37:07
Maybe some positive async tests too?
bakkot
2016/08/31 19:46:28
Done.
|
+ "set : 0", |
// Keywords, future reserved and strict future reserved are also allowed as |
// property names. |
"if: 4", |