OLD | NEW |
| (Empty) |
1 Make sure that we correctly identify parse errors in object literals | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 PASS ({a:1, get a(){}}) threw exception SyntaxError: Unexpected token '}'. | |
7 PASS ({a:1, set a(){}}) threw exception SyntaxError: Unexpected token '}'. | |
8 PASS ({get a(){}, a:1}) threw exception SyntaxError: Unexpected token '}'. | |
9 PASS ({set a(){}, a:1}) threw exception SyntaxError: Unexpected token '}'. | |
10 PASS ({get a(){}, get a(){}}) threw exception SyntaxError: Unexpected token '}'. | |
11 PASS ({set a(){}, set a(){}}) threw exception SyntaxError: Unexpected token '}'. | |
12 PASS ({set a(){}, get a(){}, set a(){}}) threw exception SyntaxError: Unexpected
token '}'. | |
13 PASS (function(){({a:1, get a(){}})}) threw exception SyntaxError: Unexpected to
ken '}'. | |
14 PASS (function(){({a:1, set a(){}})}) threw exception SyntaxError: Unexpected to
ken '}'. | |
15 PASS (function(){({get a(){}, a:1})}) threw exception SyntaxError: Unexpected to
ken '}'. | |
16 PASS (function(){({set a(){}, a:1})}) threw exception SyntaxError: Unexpected to
ken '}'. | |
17 PASS (function(){({get a(){}, get a(){}})}) threw exception SyntaxError: Unexpec
ted token '}'. | |
18 PASS (function(){({set a(){}, set a(){}})}) threw exception SyntaxError: Unexpec
ted token '}'. | |
19 PASS (function(){({set a(){}, get a(){}, set a(){}})}) threw exception SyntaxErr
or: Unexpected token '}'. | |
20 PASS ({a:1, a:1, a:1}), true is true | |
21 PASS ({get a(){}, set a(){}}), true is true | |
22 PASS ({set a(){}, get a(){}}), true is true | |
23 PASS (function(){({a:1, a:1, a:1})}), true is true | |
24 PASS (function(){({get a(){}, set a(){}})}), true is true | |
25 PASS (function(){({set a(){}, get a(){}})}), true is true | |
26 PASS successfullyParsed is true | |
27 | |
28 TEST COMPLETE | |
29 | |
OLD | NEW |