OLD | NEW |
| (Empty) |
1 // Copyright 2016 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // from test/webkit/fast/js/kde/parse.js | |
6 assertThrows("function test() { while(0) break lab; } lab: 1"); | |
7 assertThrows("function test() { while(0) continue lab; } lab: 1"); | |
8 assertThrows("function test() { while(0) break lab } lab: 1"); | |
9 assertThrows("function test() { while(0) continue lab } lab: 1"); | |
10 | |
11 // from test/webkit/fast/js/parser-syntax-check.js | |
12 assertThrows("break ; break your_limits ; continue ; continue living ; debugger"
); | |
13 assertThrows("function f() { break ; break your_limits ; continue ; continue liv
ing ; debugger }"); | |
14 assertThrows("try { break } catch(e) {}"); | |
15 assertThrows("function f() { try { break } catch(e) {} }"); | |
16 assertThrows("L: L: ;"); | |
17 assertThrows("function f() { L: L: ; }"); | |
18 assertThrows("L: L1: L: ;"); | |
19 assertThrows("function f() { L: L1: L: ; }"); | |
20 assertThrows("L: L1: L2: L3: L4: L: ;"); | |
21 assertThrows("function f() { L: L1: L2: L3: L4: L: ; }"); | |
22 | |
23 // from test/mjsunit/es6/async-destructuring.js | |
24 assertThrows("'use strict'; async function f(x) { let x = 0; }", SyntaxError); | |
25 assertThrows("'use strict'; async function f({x}) { let x = 0; }", SyntaxError); | |
26 assertThrows("'use strict'; async function f(x) { const x = 0; }", SyntaxError); | |
27 assertThrows("'use strict'; async function f({x}) { const x = 0; }", SyntaxError
); | |
28 | |
29 // from test/mjsunit/es6/destructuring.js | |
30 assertThrows("'use strict'; function f(x) { let x = 0; }", SyntaxError); | |
31 assertThrows("'use strict'; function f({x}) { let x = 0; }", SyntaxError); | |
32 assertThrows("'use strict'; function f(x) { const x = 0; }", SyntaxError); | |
33 assertThrows("'use strict'; function f({x}) { const x = 0; }", SyntaxError); | |
34 | |
35 // from test/mjsunit/es6/generator-destructuring.js | |
36 assertThrows("'use strict'; function* f(x) { let x = 0; }", SyntaxError); | |
37 assertThrows("'use strict'; function* f({x}) { let x = 0; }", SyntaxError); | |
38 assertThrows("'use strict'; function* f(x) { const x = 0; }", SyntaxError); | |
39 assertThrows("'use strict'; function* f({x}) { const x = 0; }", SyntaxError); | |
OLD | NEW |