| This test checks that the following expressions or statements are valid ECMASCRIPT code or should throw parse error |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| Unary operators and member access |
| PASS Valid: "" |
| PASS Valid: "function f() { }" |
| PASS Invalid: "(a" |
| PASS Invalid: "function f() { (a }" |
| PASS Invalid: "a[5" |
| PASS Invalid: "function f() { a[5 }" |
| PASS Invalid: "a[5 + 6" |
| PASS Invalid: "function f() { a[5 + 6 }" |
| PASS Invalid: "a." |
| PASS Invalid: "function f() { a. }" |
| PASS Invalid: "()" |
| PASS Invalid: "function f() { () }" |
| PASS Invalid: "a.'l'" |
| PASS Invalid: "function f() { a.'l' }" |
| PASS Valid: "a: +~!new a" with ReferenceError |
| PASS Valid: "function f() { a: +~!new a }" |
| PASS Invalid: "new -a" |
| PASS Invalid: "function f() { new -a }" |
| PASS Valid: "new (-1)" with TypeError |
| PASS Valid: "function f() { new (-1) }" |
| PASS Valid: "a: b: c: new f(x++)++" with ReferenceError |
| PASS Valid: "function f() { a: b: c: new f(x++)++ }" |
| PASS Valid: "(a)++" with ReferenceError |
| PASS Valid: "function f() { (a)++ }" |
| PASS Valid: "(1--).x" with ReferenceError |
| PASS Valid: "function f() { (1--).x }" |
| PASS Invalid: "a-- ++" |
| PASS Invalid: "function f() { a-- ++ }" |
| PASS Invalid: "(a:) --b" |
| PASS Invalid: "function f() { (a:) --b }" |
| PASS Valid: "++ -- ++ a" with ReferenceError |
| PASS Valid: "function f() { ++ -- ++ a }" |
| PASS Valid: "++ new new a ++" with ReferenceError |
| PASS Valid: "function f() { ++ new new a ++ }" |
| PASS Valid: "delete void 0" |
| PASS Valid: "function f() { delete void 0 }" |
| PASS Invalid: "delete the void" |
| PASS Invalid: "function f() { delete the void }" |
| PASS Invalid: "(a++" |
| PASS Invalid: "function f() { (a++ }" |
| PASS Valid: "++a--" with ReferenceError |
| PASS Valid: "function f() { ++a-- }" |
| PASS Valid: "++((a))--" with ReferenceError |
| PASS Valid: "function f() { ++((a))-- }" |
| PASS Valid: "(a.x++)++" with ReferenceError |
| PASS Valid: "function f() { (a.x++)++ }" |
| PASS Invalid: "1: null" |
| PASS Invalid: "function f() { 1: null }" |
| PASS Invalid: "+-!~" |
| PASS Invalid: "function f() { +-!~ }" |
| PASS Invalid: "+-!~((" |
| PASS Invalid: "function f() { +-!~(( }" |
| PASS Invalid: "a)" |
| PASS Invalid: "function f() { a) }" |
| PASS Invalid: "a]" |
| PASS Invalid: "function f() { a] }" |
| PASS Invalid: ".l" |
| PASS Invalid: "function f() { .l }" |
| PASS Invalid: "1.l" |
| PASS Invalid: "function f() { 1.l }" |
| PASS Valid: "1 .l" |
| PASS Valid: "function f() { 1 .l }" |
| Octal numbers |
| PASS Valid: "'use strict'; 0" |
| PASS Valid: "function f() { 'use strict'; 0 }" |
| PASS Valid: "0" |
| PASS Valid: "function f() { 0 }" |
| PASS Invalid: "'use strict'; 00" |
| PASS Invalid: "function f() { 'use strict'; 00 }" |
| PASS Valid: "00" |
| PASS Valid: "function f() { 00 }" |
| PASS Invalid: "'use strict'; 08" |
| PASS Invalid: "function f() { 'use strict'; 08 }" |
| PASS Valid: "08" |
| PASS Valid: "function f() { 08 }" |
| PASS Invalid: "'use strict'; 09" |
| PASS Invalid: "function f() { 'use strict'; 09 }" |
| PASS Valid: "09" |
| PASS Valid: "function f() { 09 }" |
| Binary and conditional operators |
| PASS Valid: "a + + typeof this" with ReferenceError |
| PASS Valid: "function f() { a + + typeof this }" |
| PASS Invalid: "a + * b" |
| PASS Invalid: "function f() { a + * b }" |
| PASS Invalid: "a ? b" |
| PASS Invalid: "function f() { a ? b }" |
| PASS Invalid: "a ? b :" |
| PASS Invalid: "function f() { a ? b : }" |
| PASS Invalid: "%a" |
| PASS Invalid: "function f() { %a }" |
| PASS Invalid: "a-" |
| PASS Invalid: "function f() { a- }" |
| PASS Valid: "a = b ? b = c : d = e" with ReferenceError |
| PASS Valid: "function f() { a = b ? b = c : d = e }" |
| PASS Valid: "s: a[1].l ? b.l['s'] ? c++ : d : true" with ReferenceError |
| PASS Valid: "function f() { s: a[1].l ? b.l['s'] ? c++ : d : true }" |
| PASS Valid: "a ? b + 1 ? c + 3 * d.l : d[5][6] : e" with ReferenceError |
| PASS Valid: "function f() { a ? b + 1 ? c + 3 * d.l : d[5][6] : e }" |
| PASS Valid: "a in b instanceof delete -c" with ReferenceError |
| PASS Valid: "function f() { a in b instanceof delete -c }" |
| PASS Invalid: "a in instanceof b.l" |
| PASS Invalid: "function f() { a in instanceof b.l }" |
| PASS Valid: "- - true % 5" |
| PASS Valid: "function f() { - - true % 5 }" |
| PASS Invalid: "- false = 3" |
| PASS Invalid: "function f() { - false = 3 }" |
| PASS Valid: "a: b: c: (1 + null) = 3" with ReferenceError |
| PASS Valid: "function f() { a: b: c: (1 + null) = 3 }" |
| PASS Valid: "a[2] = b.l += c /= 4 * 7 ^ !6" with ReferenceError |
| PASS Valid: "function f() { a[2] = b.l += c /= 4 * 7 ^ !6 }" |
| PASS Invalid: "a + typeof b += c in d" |
| PASS Invalid: "function f() { a + typeof b += c in d }" |
| PASS Invalid: "typeof a &= typeof b" |
| PASS Invalid: "function f() { typeof a &= typeof b }" |
| PASS Valid: "a: ((typeof (a))) >>>= a || b.l && c" with ReferenceError |
| PASS Valid: "function f() { a: ((typeof (a))) >>>= a || b.l && c }" |
| PASS Valid: "a: b: c[a /= f[a %= b]].l[c[x] = 7] -= a ? b <<= f : g" with ReferenceError |
| PASS Valid: "function f() { a: b: c[a /= f[a %= b]].l[c[x] = 7] -= a ? b <<= f : g }" |
| PASS Valid: "-void+x['y'].l == x.l != 5 - f[7]" with ReferenceError |
| PASS Valid: "function f() { -void+x['y'].l == x.l != 5 - f[7] }" |
| Function calls (and new with arguments) |
| PASS Valid: "a()()()" with ReferenceError |
| PASS Valid: "function f() { a()()() }" |
| PASS Valid: "s: l: a[2](4 == 6, 5 = 6)(f[4], 6)" with ReferenceError |
| PASS Valid: "function f() { s: l: a[2](4 == 6, 5 = 6)(f[4], 6) }" |
| PASS Valid: "s: eval(a.apply(), b.call(c[5] - f[7]))" with ReferenceError |
| PASS Valid: "function f() { s: eval(a.apply(), b.call(c[5] - f[7])) }" |
| PASS Invalid: "a(" |
| PASS Invalid: "function f() { a( }" |
| PASS Invalid: "a(5" |
| PASS Invalid: "function f() { a(5 }" |
| PASS Invalid: "a(5," |
| PASS Invalid: "function f() { a(5, }" |
| PASS Invalid: "a(5,)" |
| PASS Invalid: "function f() { a(5,) }" |
| PASS Invalid: "a(5,6" |
| PASS Invalid: "function f() { a(5,6 }" |
| PASS Valid: "a(b[7], c <d> e.l, new a() > b)" with ReferenceError |
| PASS Valid: "function f() { a(b[7], c <d> e.l, new a() > b) }" |
| PASS Invalid: "a(b[5)" |
| PASS Invalid: "function f() { a(b[5) }" |
| PASS Invalid: "a(b.)" |
| PASS Invalid: "function f() { a(b.) }" |
| PASS Valid: "~new new a(1)(i++)(c[l])" with ReferenceError |
| PASS Valid: "function f() { ~new new a(1)(i++)(c[l]) }" |
| PASS Invalid: "a(*a)" |
| PASS Invalid: "function f() { a(*a) }" |
| PASS Valid: "((((a))((b)()).l))()" with ReferenceError |
| PASS Valid: "function f() { ((((a))((b)()).l))() }" |
| PASS Valid: "(a)[b + (c) / (d())].l--" with ReferenceError |
| PASS Valid: "function f() { (a)[b + (c) / (d())].l-- }" |
| PASS Valid: "new (5)" with TypeError |
| PASS Valid: "function f() { new (5) }" |
| PASS Invalid: "new a(5" |
| PASS Invalid: "function f() { new a(5 }" |
| PASS Valid: "new (f + 5)(6, (g)() - 'l'() - true(false))" with ReferenceError |
| PASS Valid: "function f() { new (f + 5)(6, (g)() - 'l'() - true(false)) }" |
| PASS Invalid: "a(.length)" |
| PASS Invalid: "function f() { a(.length) }" |
| function declaration and expression |
| PASS Valid: "function f() {}" |
| PASS Valid: "function f() { function f() {} }" |
| PASS Valid: "function f(a,b) {}" |
| PASS Valid: "function f() { function f(a,b) {} }" |
| PASS Invalid: "function () {}" |
| PASS Invalid: "function f() { function () {} }" |
| PASS Invalid: "function f(a b) {}" |
| PASS Invalid: "function f() { function f(a b) {} }" |
| PASS Invalid: "function f(a,) {}" |
| PASS Invalid: "function f() { function f(a,) {} }" |
| PASS Invalid: "function f(a," |
| PASS Invalid: "function f() { function f(a, }" |
| PASS Invalid: "function f(a, 1) {}" |
| PASS Invalid: "function f() { function f(a, 1) {} }" |
| PASS Valid: "function g(arguments, eval) {}" |
| PASS Valid: "function f() { function g(arguments, eval) {} }" |
| PASS Valid: "function f() {} + function g() {}" |
| PASS Valid: "function f() { function f() {} + function g() {} }" |
| PASS Invalid: "(function a{})" |
| PASS Invalid: "function f() { (function a{}) }" |
| PASS Invalid: "(function this(){})" |
| PASS Invalid: "function f() { (function this(){}) }" |
| PASS Valid: "(delete new function f(){} + function(a,b){}(5)(6))" with TypeError |
| PASS Valid: "function f() { (delete new function f(){} + function(a,b){}(5)(6)) }" |
| PASS Valid: "6 - function (m) { function g() {} }" |
| PASS Valid: "function f() { 6 - function (m) { function g() {} } }" |
| PASS Invalid: "function l() {" |
| PASS Invalid: "function f() { function l() { }" |
| PASS Invalid: "function l++(){}" |
| PASS Invalid: "function f() { function l++(){} }" |
| Array and object literal, comma operator |
| PASS Valid: "[] in [5,6] * [,5,] / [,,5,,] || [a,] && new [,b] % [,,]" with TypeError |
| PASS Valid: "function f() { [] in [5,6] * [,5,] / [,,5,,] || [a,] && new [,b] % [,,] }" |
| PASS Invalid: "[5," |
| PASS Invalid: "function f() { [5, }" |
| PASS Invalid: "[," |
| PASS Invalid: "function f() { [, }" |
| PASS Invalid: "(a,)" |
| PASS Invalid: "function f() { (a,) }" |
| PASS Valid: "1 + {get get(){}, set set(a){}, get1:4, set1:get-set, }" with ReferenceError |
| PASS Valid: "function f() { 1 + {get get(){}, set set(a){}, get1:4, set1:get-set, } }" |
| PASS Invalid: "1 + {a" |
| PASS Invalid: "function f() { 1 + {a }" |
| PASS Invalid: "1 + {a:" |
| PASS Invalid: "function f() { 1 + {a: }" |
| PASS Invalid: "1 + {get l(" |
| PASS Invalid: "function f() { 1 + {get l( }" |
| PASS Invalid: ",a" |
| PASS Invalid: "function f() { ,a }" |
| PASS Valid: "(4,(5,a(3,4))),f[4,a-6]" with ReferenceError |
| PASS Valid: "function f() { (4,(5,a(3,4))),f[4,a-6] }" |
| PASS Invalid: "(,f)" |
| PASS Invalid: "function f() { (,f) }" |
| PASS Invalid: "a,,b" |
| PASS Invalid: "function f() { a,,b }" |
| PASS Invalid: "a ? b, c : d" |
| PASS Invalid: "function f() { a ? b, c : d }" |
| simple statements |
| PASS Valid: "{ }" |
| PASS Valid: "function f() { { } }" |
| PASS Invalid: "{ { }" |
| PASS Invalid: "function f() { { { } }" |
| PASS Valid: "{ ; ; ; }" |
| PASS Valid: "function f() { { ; ; ; } }" |
| PASS Valid: "a: { ; }" |
| PASS Valid: "function f() { a: { ; } }" |
| PASS Invalid: "{ a: }" |
| PASS Invalid: "function f() { { a: } }" |
| PASS Valid: "{} f; { 6 + f() }" with ReferenceError |
| PASS Valid: "function f() { {} f; { 6 + f() } }" |
| PASS Valid: "{ a[5],6; {} ++b-new (-5)() } c().l++" with ReferenceError |
| PASS Valid: "function f() { { a[5],6; {} ++b-new (-5)() } c().l++ }" |
| PASS Valid: "{ l1: l2: l3: { this } a = 32 ; { i++ ; { { { } } ++i } } }" with ReferenceError |
| PASS Valid: "function f() { { l1: l2: l3: { this } a = 32 ; { i++ ; { { { } } ++i } } } }" |
| PASS Valid: "if (a) ;" |
| PASS Valid: "function f() { if (a) ; }" |
| PASS Invalid: "{ if (a) }" |
| PASS Invalid: "function f() { { if (a) } }" |
| PASS Invalid: "if a {}" |
| PASS Invalid: "function f() { if a {} }" |
| PASS Invalid: "if (a" |
| PASS Invalid: "function f() { if (a }" |
| PASS Invalid: "if (a { }" |
| PASS Invalid: "function f() { if (a { } }" |
| PASS Valid: "x: s: if (a) ; else b" |
| PASS Valid: "function f() { x: s: if (a) ; else b }" |
| PASS Invalid: "else {}" |
| PASS Invalid: "function f() { else {} }" |
| PASS Valid: "if (a) if (b) y; else {} else ;" with ReferenceError |
| PASS Valid: "function f() { if (a) if (b) y; else {} else ; }" |
| PASS Invalid: "if (a) {} else x; else" |
| PASS Invalid: "function f() { if (a) {} else x; else }" |
| PASS Invalid: "if (a) { else }" |
| PASS Invalid: "function f() { if (a) { else } }" |
| PASS Valid: "if (a.l + new b()) 4 + 5 - f()" with ReferenceError |
| PASS Valid: "function f() { if (a.l + new b()) 4 + 5 - f() }" |
| PASS Valid: "if (a) with (x) ; else with (y) ;" with ReferenceError |
| PASS Valid: "function f() { if (a) with (x) ; else with (y) ; }" |
| PASS Invalid: "with a.b { }" |
| PASS Invalid: "function f() { with a.b { } }" |
| PASS Valid: "while (a() - new b) ;" with TypeError |
| PASS Valid: "function f() { while (a() - new b) ; }" |
| PASS Invalid: "while a {}" |
| PASS Invalid: "function f() { while a {} }" |
| PASS Valid: "do ; while(0) i++" with ReferenceError |
| PASS Valid: "function f() { do ; while(0) i++ }" |
| PASS Valid: "do if (a) x; else y; while(z)" with ReferenceError |
| PASS Valid: "function f() { do if (a) x; else y; while(z) }" |
| PASS Invalid: "do g; while 4" |
| PASS Invalid: "function f() { do g; while 4 }" |
| PASS Invalid: "do g; while ((4)" |
| PASS Invalid: "function f() { do g; while ((4) }" |
| PASS Valid: "{ { do do do ; while(0) while(0) while(0) } }" |
| PASS Valid: "function f() { { { do do do ; while(0) while(0) while(0) } } }" |
| PASS Valid: "do while (0) if (a) {} else y; while(0)" |
| PASS Valid: "function f() { do while (0) if (a) {} else y; while(0) }" |
| PASS Valid: "if (a) while (b) if (c) with(d) {} else e; else f" with ReferenceError |
| PASS Valid: "function f() { if (a) while (b) if (c) with(d) {} else e; else f }" |
| PASS Invalid: "break ; break your_limits ; continue ; continue living ; debugger" |
| PASS Invalid: "function f() { break ; break your_limits ; continue ; continue living ; debugger }" |
| PASS Invalid: "debugger X" |
| PASS Invalid: "function f() { debugger X }" |
| PASS Invalid: "break 0.2" |
| PASS Invalid: "function f() { break 0.2 }" |
| PASS Invalid: "continue a++" |
| PASS Invalid: "function f() { continue a++ }" |
| PASS Invalid: "continue (my_friend)" |
| PASS Invalid: "function f() { continue (my_friend) }" |
| PASS Valid: "while (1) break" |
| PASS Valid: "function f() { while (1) break }" |
| PASS Valid: "do if (a) with (b) continue; else debugger; while (false)" with ReferenceError |
| PASS Valid: "function f() { do if (a) with (b) continue; else debugger; while (false) }" |
| PASS Invalid: "do if (a) while (false) else debugger" |
| PASS Invalid: "function f() { do if (a) while (false) else debugger }" |
| PASS Invalid: "while if (a) ;" |
| PASS Invalid: "function f() { while if (a) ; }" |
| PASS Valid: "if (a) function f() {} else function g() {}" |
| PASS Valid: "function f() { if (a) function f() {} else function g() {} }" |
| PASS Valid: "if (a()) while(0) function f() {} else function g() {}" with TypeError |
| PASS Valid: "function f() { if (a()) while(0) function f() {} else function g() {} }" |
| PASS Invalid: "if (a()) function f() { else function g() }" |
| PASS Invalid: "function f() { if (a()) function f() { else function g() } }" |
| PASS Invalid: "if (a) if (b) ; else function f {}" |
| PASS Invalid: "function f() { if (a) if (b) ; else function f {} }" |
| PASS Invalid: "if (a) if (b) ; else function (){}" |
| PASS Invalid: "function f() { if (a) if (b) ; else function (){} }" |
| PASS Valid: "throw a" with 32 |
| PASS Valid: "function f() { throw a }" |
| PASS Valid: "throw a + b in void c" with ReferenceError |
| PASS Valid: "function f() { throw a + b in void c }" |
| PASS Invalid: "throw" |
| PASS Invalid: "function f() { throw }" |
| var and const statements |
| PASS Valid: "var a, b = null" |
| PASS Valid: "function f() { var a, b = null }" |
| PASS Valid: "const a = 5, b = 10, c = 20" |
| PASS Valid: "function f() { const a = 5, b = 10, c = 20 }" |
| PASS Invalid: "var" |
| PASS Invalid: "function f() { var }" |
| PASS Invalid: "var = 7" |
| PASS Invalid: "function f() { var = 7 }" |
| PASS Invalid: "var c (6)" |
| PASS Invalid: "function f() { var c (6) }" |
| PASS Valid: "if (a) var a,b; else { const b = 1, c = 2; }" |
| PASS Valid: "function f() { if (a) var a,b; else { const b = 1, c = 2; } }" |
| PASS Invalid: "if (a) var a,b; else { const b, c }" |
| PASS Invalid: "function f() { if (a) var a,b; else { const b, c } }" |
| PASS Invalid: "var 5 = 6" |
| PASS Invalid: "function f() { var 5 = 6 }" |
| PASS Valid: "while (0) var a, b, c=6, d, e, f=5*6, g=f*h, h" |
| PASS Valid: "function f() { while (0) var a, b, c=6, d, e, f=5*6, g=f*h, h }" |
| PASS Invalid: "var a = if (b) { c }" |
| PASS Invalid: "function f() { var a = if (b) { c } }" |
| PASS Invalid: "var a = var b" |
| PASS Invalid: "function f() { var a = var b }" |
| PASS Invalid: "const a = b += c, a, a, a = (b - f())" |
| PASS Invalid: "function f() { const a = b += c, a, a, a = (b - f()) }" |
| PASS Invalid: "var a %= b | 5" |
| PASS Invalid: "function f() { var a %= b | 5 }" |
| PASS Invalid: "var (a) = 5" |
| PASS Invalid: "function f() { var (a) = 5 }" |
| PASS Invalid: "var a = (4, b = 6" |
| PASS Invalid: "function f() { var a = (4, b = 6 }" |
| PASS Invalid: "const 'l' = 3" |
| PASS Invalid: "function f() { const 'l' = 3 }" |
| PASS Invalid: "var var = 3" |
| PASS Invalid: "function f() { var var = 3 }" |
| PASS Valid: "var varr = 3 in 1" with TypeError |
| PASS Valid: "function f() { var varr = 3 in 1 }" |
| PASS Valid: "const a = void 7 - typeof 8, b = 8" |
| PASS Valid: "function f() { const a = void 7 - typeof 8, b = 8 }" |
| PASS Invalid: "const a, a, a = void 7 - typeof 8, a = 8" |
| PASS Invalid: "function f() { const a, a, a = void 7 - typeof 8, a = 8 }" |
| PASS Valid: "const x_x = 6 /= 7 ? e : f" with ReferenceError |
| PASS Valid: "function f() { const x_x = 6 /= 7 ? e : f }" |
| PASS Invalid: "var a = ?" |
| PASS Invalid: "function f() { var a = ? }" |
| PASS Invalid: "const a = *7" |
| PASS Invalid: "function f() { const a = *7 }" |
| PASS Invalid: "var a = :)" |
| PASS Invalid: "function f() { var a = :) }" |
| PASS Valid: "var a = a in b in c instanceof d" with ReferenceError |
| PASS Valid: "function f() { var a = a in b in c instanceof d }" |
| PASS Invalid: "var a = b ? c, b" |
| PASS Invalid: "function f() { var a = b ? c, b }" |
| PASS Invalid: "const a = b : c" |
| PASS Invalid: "function f() { const a = b : c }" |
| PASS Valid: "const a = 7; eval(''); a++" with TypeError |
| PASS Valid: "function f() { const a = 7; eval(''); a++ }" |
| PASS Valid: "const a = 7; eval(''); a--" with TypeError |
| PASS Valid: "function f() { const a = 7; eval(''); a-- }" |
| PASS Valid: "const a = 7; with({}) a++" with TypeError |
| PASS Valid: "function f() { const a = 7; with({}) a++ }" |
| PASS Valid: "const a = 7; with({}) a--" with TypeError |
| PASS Valid: "function f() { const a = 7; with({}) a-- }" |
| PASS Valid: "const a = 7; eval(''); a+=1" with TypeError |
| PASS Valid: "function f() { const a = 7; eval(''); a+=1 }" |
| PASS Valid: "const a = 7; eval(''); a-=1" with TypeError |
| PASS Valid: "function f() { const a = 7; eval(''); a-=1 }" |
| PASS Valid: "const a = 7; with({}) a+=1" with TypeError |
| PASS Valid: "function f() { const a = 7; with({}) a+=1 }" |
| PASS Valid: "const a = 7; with({}) a-=1" with TypeError |
| PASS Valid: "function f() { const a = 7; with({}) a-=1 }" |
| PASS Valid: "const a = 7; eval(''); a=1" with TypeError |
| PASS Valid: "function f() { const a = 7; eval(''); a=1 }" |
| PASS Valid: "const a = 7; eval(''); a=1" with TypeError |
| PASS Valid: "function f() { const a = 7; eval(''); a=1 }" |
| PASS Valid: "const a = 7; with({}) a=1" with TypeError |
| PASS Valid: "function f() { const a = 7; with({}) a=1 }" |
| PASS Valid: "const a = 7; with({}) a=1" with TypeError |
| PASS Valid: "function f() { const a = 7; with({}) a=1 }" |
| for statement |
| PASS Valid: "for ( ; ; ) { break }" |
| PASS Valid: "function f() { for ( ; ; ) { break } }" |
| PASS Valid: "for ( a ; ; ) { break }" |
| PASS Valid: "function f() { for ( a ; ; ) { break } }" |
| PASS Valid: "for ( ; a ; ) { break }" |
| PASS Valid: "function f() { for ( ; a ; ) { break } }" |
| PASS Valid: "for ( ; ; a ) { break }" |
| PASS Valid: "function f() { for ( ; ; a ) { break } }" |
| PASS Valid: "for ( a ; a ; ) break" |
| PASS Valid: "function f() { for ( a ; a ; ) break }" |
| PASS Valid: "for ( a ; ; a ) break" |
| PASS Valid: "function f() { for ( a ; ; a ) break }" |
| PASS Valid: "for ( ; a ; a ) break" |
| PASS Valid: "function f() { for ( ; a ; a ) break }" |
| PASS Invalid: "for () { }" |
| PASS Invalid: "function f() { for () { } }" |
| PASS Invalid: "for ( a ) { }" |
| PASS Invalid: "function f() { for ( a ) { } }" |
| PASS Invalid: "for ( ; ) ;" |
| PASS Invalid: "function f() { for ( ; ) ; }" |
| PASS Invalid: "for a ; b ; c { }" |
| PASS Invalid: "function f() { for a ; b ; c { } }" |
| PASS Invalid: "for (a ; { }" |
| PASS Invalid: "function f() { for (a ; { } }" |
| PASS Invalid: "for ( a ; ) ;" |
| PASS Invalid: "function f() { for ( a ; ) ; }" |
| PASS Invalid: "for ( ; a ) break" |
| PASS Invalid: "function f() { for ( ; a ) break }" |
| PASS Valid: "for (var a, b ; ; ) { break } " |
| PASS Valid: "function f() { for (var a, b ; ; ) { break } }" |
| PASS Valid: "for (var a = b, b = a ; ; ) break" |
| PASS Valid: "function f() { for (var a = b, b = a ; ; ) break }" |
| PASS Valid: "for (var a = b, c, d, b = a ; x in b ; ) { break }" with ReferenceError |
| PASS Valid: "function f() { for (var a = b, c, d, b = a ; x in b ; ) { break } }" |
| PASS Valid: "for (var a = b, c, d ; ; 1 in a()) break" with ReferenceError |
| PASS Valid: "function f() { for (var a = b, c, d ; ; 1 in a()) break }" |
| PASS Invalid: "for ( ; var a ; ) break" |
| PASS Invalid: "function f() { for ( ; var a ; ) break }" |
| PASS Invalid: "for (const x; ; ) break" |
| PASS Invalid: "function f() { for (const x; ; ) break }" |
| PASS Invalid: "for (const x = 20, y; ; ) break" |
| PASS Invalid: "function f() { for (const x = 20, y; ; ) break }" |
| PASS Valid: "for (const x = 20; ; ) break" |
| PASS Valid: "function f() { for (const x = 20; ; ) break }" |
| PASS Valid: "for (const x of []) break" |
| PASS Valid: "function f() { for (const x of []) break }" |
| PASS Valid: "for (const x in {}) break" |
| PASS Valid: "function f() { for (const x in {}) break }" |
| PASS Invalid: "for (const x = 20, x = 30; ; ) { const x = 20; break; }" |
| PASS Invalid: "function f() { for (const x = 20, x = 30; ; ) { const x = 20; break; } }" |
| PASS Valid: "for (const x = 20; ; ) { const x = 20; break; }" |
| PASS Valid: "function f() { for (const x = 20; ; ) { const x = 20; break; } }" |
| PASS Valid: "for (const x of []) { const x = 20; break; }" |
| PASS Valid: "function f() { for (const x of []) { const x = 20; break; } }" |
| PASS Valid: "for (const x in {}) { const x = 20; break; }" |
| PASS Valid: "function f() { for (const x in {}) { const x = 20; break; } }" |
| PASS Invalid: "for (const let = 10; ; ) { break; }" |
| PASS Invalid: "function f() { for (const let = 10; ; ) { break; } }" |
| PASS Invalid: "for (const let in {}) { break; }" |
| PASS Invalid: "function f() { for (const let in {}) { break; } }" |
| PASS Invalid: "for (const let of []) { break; }" |
| PASS Invalid: "function f() { for (const let of []) { break; } }" |
| PASS Invalid: "for (let let = 10; ; ) { break; }" |
| PASS Invalid: "function f() { for (let let = 10; ; ) { break; } }" |
| PASS Invalid: "for (let let in {}) { break; }" |
| PASS Invalid: "function f() { for (let let in {}) { break; } }" |
| PASS Invalid: "for (let let of []) { break; }" |
| PASS Invalid: "function f() { for (let let of []) { break; } }" |
| PASS Invalid: "for ( %a ; ; ) { }" |
| PASS Invalid: "function f() { for ( %a ; ; ) { } }" |
| PASS Valid: "for (a in b) break" with ReferenceError |
| PASS Valid: "function f() { for (a in b) break }" |
| PASS Valid: "for (a() in b) break" with ReferenceError |
| PASS Valid: "function f() { for (a() in b) break }" |
| PASS Valid: "for (a().l[4] in b) break" with ReferenceError |
| PASS Valid: "function f() { for (a().l[4] in b) break }" |
| PASS Valid: "for (new a in b in c in d) break" with ReferenceError |
| PASS Valid: "function f() { for (new a in b in c in d) break }" |
| PASS Valid: "for (new new new a in b) break" with ReferenceError |
| PASS Valid: "function f() { for (new new new a in b) break }" |
| PASS Invalid: "for (delete new a() in b) break" |
| PASS Invalid: "function f() { for (delete new a() in b) break }" |
| PASS Invalid: "for (a * a in b) break" |
| PASS Invalid: "function f() { for (a * a in b) break }" |
| PASS Valid: "for ((a * a) in b) break" with ReferenceError |
| PASS Valid: "function f() { for ((a * a) in b) break }" |
| PASS Invalid: "for (a++ in b) break" |
| PASS Invalid: "function f() { for (a++ in b) break }" |
| PASS Valid: "for ((a++) in b) break" with ReferenceError |
| PASS Valid: "function f() { for ((a++) in b) break }" |
| PASS Invalid: "for (++a in b) break" |
| PASS Invalid: "function f() { for (++a in b) break }" |
| PASS Valid: "for ((++a) in b) break" with ReferenceError |
| PASS Valid: "function f() { for ((++a) in b) break }" |
| PASS Invalid: "for (a, b in c) break" |
| PASS Invalid: "function f() { for (a, b in c) break }" |
| PASS Invalid: "for (a,b in c ;;) break" |
| PASS Invalid: "function f() { for (a,b in c ;;) break }" |
| PASS Valid: "for (a,(b in c) ;;) break" with ReferenceError |
| PASS Valid: "function f() { for (a,(b in c) ;;) break }" |
| PASS Valid: "for ((a, b) in c) break" with ReferenceError |
| PASS Valid: "function f() { for ((a, b) in c) break }" |
| PASS Invalid: "for (a ? b : c in c) break" |
| PASS Invalid: "function f() { for (a ? b : c in c) break }" |
| PASS Valid: "for ((a ? b : c) in c) break" with ReferenceError |
| PASS Valid: "function f() { for ((a ? b : c) in c) break }" |
| PASS Valid: "for (var a in b in c) break" with ReferenceError |
| PASS Valid: "function f() { for (var a in b in c) break }" |
| PASS Valid: "for (var a = 5 += 6 in b) break" with ReferenceError |
| PASS Valid: "function f() { for (var a = 5 += 6 in b) break }" |
| PASS Valid: "for (var a = debug('should not be hit') in b) break" with ReferenceError |
| PASS Valid: "function f() { for (var a = debug('should not be hit') in b) break }" |
| PASS Invalid: "for (var a += 5 in b) break" |
| PASS Invalid: "function f() { for (var a += 5 in b) break }" |
| PASS Invalid: "for (var a = in b) break" |
| PASS Invalid: "function f() { for (var a = in b) break }" |
| PASS Invalid: "for (var a, b in b) break" |
| PASS Invalid: "function f() { for (var a, b in b) break }" |
| PASS Invalid: "for (var a = -6, b in b) break" |
| PASS Invalid: "function f() { for (var a = -6, b in b) break }" |
| PASS Invalid: "for (var a, b = 8 in b) break" |
| PASS Invalid: "function f() { for (var a, b = 8 in b) break }" |
| PASS Valid: "for (var a = (b in c) in d) break" with ReferenceError |
| PASS Valid: "function f() { for (var a = (b in c) in d) break }" |
| PASS Invalid: "for (var a = (b in c in d) break" |
| PASS Invalid: "function f() { for (var a = (b in c in d) break }" |
| PASS Invalid: "for (var (a) in b) { }" |
| PASS Invalid: "function f() { for (var (a) in b) { } }" |
| PASS Valid: "for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {}" with ReferenceError |
| PASS Valid: "function f() { for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {} }" |
| try statement |
| PASS Invalid: "try { break } catch(e) {}" |
| PASS Invalid: "function f() { try { break } catch(e) {} }" |
| PASS Valid: "try {} finally { c++ }" with ReferenceError |
| PASS Valid: "function f() { try {} finally { c++ } }" |
| PASS Valid: "try { with (x) { } } catch(e) {} finally { if (a) ; }" |
| PASS Valid: "function f() { try { with (x) { } } catch(e) {} finally { if (a) ; } }" |
| PASS Invalid: "try {}" |
| PASS Invalid: "function f() { try {} }" |
| PASS Invalid: "catch(e) {}" |
| PASS Invalid: "function f() { catch(e) {} }" |
| PASS Invalid: "finally {}" |
| PASS Invalid: "function f() { finally {} }" |
| PASS Invalid: "try a; catch(e) {}" |
| PASS Invalid: "function f() { try a; catch(e) {} }" |
| PASS Invalid: "try {} catch(e) a()" |
| PASS Invalid: "function f() { try {} catch(e) a() }" |
| PASS Invalid: "try {} finally a()" |
| PASS Invalid: "function f() { try {} finally a() }" |
| PASS Invalid: "try {} catch(e)" |
| PASS Invalid: "function f() { try {} catch(e) }" |
| PASS Invalid: "try {} finally" |
| PASS Invalid: "function f() { try {} finally }" |
| PASS Invalid: "try {} finally {} catch(e) {}" |
| PASS Invalid: "function f() { try {} finally {} catch(e) {} }" |
| PASS Invalid: "try {} catch (...) {}" |
| PASS Invalid: "function f() { try {} catch (...) {} }" |
| PASS Invalid: "try {} catch {}" |
| PASS Invalid: "function f() { try {} catch {} }" |
| PASS Valid: "if (a) try {} finally {} else b;" |
| PASS Valid: "function f() { if (a) try {} finally {} else b; }" |
| PASS Valid: "if (--a()) do with(1) try {} catch(ke) { f() ; g() } while (a in b) else {}" with ReferenceError |
| PASS Valid: "function f() { if (--a()) do with(1) try {} catch(ke) { f() ; g() } while (a in b) else {} }" |
| PASS Invalid: "if (a) try {} else b; catch (e) { }" |
| PASS Invalid: "function f() { if (a) try {} else b; catch (e) { } }" |
| PASS Invalid: "try { finally {}" |
| PASS Invalid: "function f() { try { finally {} }" |
| switch statement |
| PASS Valid: "switch (a) {}" |
| PASS Valid: "function f() { switch (a) {} }" |
| PASS Invalid: "switch () {}" |
| PASS Invalid: "function f() { switch () {} }" |
| PASS Invalid: "case 5:" |
| PASS Invalid: "function f() { case 5: }" |
| PASS Invalid: "default:" |
| PASS Invalid: "function f() { default: }" |
| PASS Invalid: "switch (a) b;" |
| PASS Invalid: "function f() { switch (a) b; }" |
| PASS Invalid: "switch (a) case 3: b;" |
| PASS Invalid: "function f() { switch (a) case 3: b; }" |
| PASS Valid: "switch (f()) { case 5 * f(): default: case '6' - 9: ++i }" with ReferenceError |
| PASS Valid: "function f() { switch (f()) { case 5 * f(): default: case '6' - 9: ++i } }" |
| PASS Invalid: "switch (true) { default: case 6: default: }" |
| PASS Invalid: "function f() { switch (true) { default: case 6: default: } }" |
| PASS Invalid: "switch (l) { f(); }" |
| PASS Invalid: "function f() { switch (l) { f(); } }" |
| PASS Invalid: "switch (l) { case 1: ; a: case 5: }" |
| PASS Invalid: "function f() { switch (l) { case 1: ; a: case 5: } }" |
| PASS Valid: "switch (g() - h[5].l) { case 1 + 6: a: b: c: ++f }" with ReferenceError |
| PASS Valid: "function f() { switch (g() - h[5].l) { case 1 + 6: a: b: c: ++f } }" |
| PASS Invalid: "switch (g) { case 1: a: }" |
| PASS Invalid: "function f() { switch (g) { case 1: a: } }" |
| PASS Invalid: "switch (g) { case 1: a: default: }" |
| PASS Invalid: "function f() { switch (g) { case 1: a: default: } }" |
| PASS Invalid: "switch g { case 1: l() }" |
| PASS Invalid: "function f() { switch g { case 1: l() } }" |
| PASS Invalid: "switch (g) { case 1:" |
| PASS Invalid: "function f() { switch (g) { case 1: }" |
| PASS Valid: "switch (l) { case a = b ? c : d : }" with ReferenceError |
| PASS Valid: "function f() { switch (l) { case a = b ? c : d : } }" |
| PASS Valid: "switch (sw) { case a ? b - 7[1] ? [c,,] : d = 6 : { } : }" with ReferenceError |
| PASS Valid: "function f() { switch (sw) { case a ? b - 7[1] ? [c,,] : d = 6 : { } : } }" |
| PASS Invalid: "switch (l) { case b ? c : }" |
| PASS Invalid: "function f() { switch (l) { case b ? c : } }" |
| PASS Valid: "switch (l) { case 1: a: with(g) switch (g) { case 2: default: } default: }" with ReferenceError |
| PASS Valid: "function f() { switch (l) { case 1: a: with(g) switch (g) { case 2: default: } default: } }" |
| PASS Invalid: "switch (4 - ) { }" |
| PASS Invalid: "function f() { switch (4 - ) { } }" |
| PASS Invalid: "switch (l) { default case: 5; }" |
| PASS Invalid: "function f() { switch (l) { default case: 5; } }" |
| PASS Invalid: "L: L: ;" |
| PASS Invalid: "function f() { L: L: ; }" |
| PASS Invalid: "L: L1: L: ;" |
| PASS Invalid: "function f() { L: L1: L: ; }" |
| PASS Invalid: "L: L1: L2: L3: L4: L: ;" |
| PASS Invalid: "function f() { L: L1: L2: L3: L4: L: ; }" |
| PASS Invalid: "for(var a,b 'this shouldn't be allowed' false ; ) ;" |
| PASS Invalid: "function f() { for(var a,b 'this shouldn't be allowed' false ; ) ; }" |
| PASS Invalid: "for(var a,b '" |
| PASS Invalid: "function f() { for(var a,b ' }" |
| PASS Valid: "function __proto__(){}" |
| PASS Valid: "function f() { function __proto__(){} }" |
| PASS Valid: "(function __proto__(){})" |
| PASS Valid: "function f() { (function __proto__(){}) }" |
| PASS Valid: "'use strict'; function __proto__(){}" |
| PASS Valid: "function f() { 'use strict'; function __proto__(){} }" |
| PASS Valid: "'use strict'; (function __proto__(){})" |
| PASS Valid: "function f() { 'use strict'; (function __proto__(){}) }" |
| PASS Valid: "'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } f1(5);" |
| PASS Valid: "function f() { 'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } f1(5); }" |
| PASS Valid: "'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } f1(5);" |
| PASS Valid: "function f() { 'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } f1(5); }" |
| PASS Invalid: "'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } f1(5);" |
| PASS Invalid: "function f() { 'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } f1(5); }" |
| PASS Invalid: "'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } f1(5);" |
| PASS Invalid: "function f() { 'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } f1(5); }" |
| PASS Valid: "var str = "'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5);" |
| PASS Valid: "function f() { var str = "'use strict'; function f1(a) { function f2(b) { return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5); }" |
| PASS Valid: "var str = "'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5);" |
| PASS Valid: "function f() { var str = "'use strict'; function f1(a) { function f2(b) { function f3(c) { return c; } return f3(b); } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5); }" |
| PASS Invalid: "var str = "'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } return f1(arguments[0]);"; var foo = new Function(str); foo(5);" |
| FAIL Invalid: "function f() { var str = "'use strict'; function f1(a) { if (a) { function f2(b) { return b; } return f2(a); } else return a; } return f1(arguments[0]);"; var foo = new Function(str); foo(5); }" but did not throw |
| PASS Invalid: "var str = "'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5);" |
| FAIL Invalid: "function f() { var str = "'use strict'; function f1(a) { function f2(b) { if (b) { function f3(c) { return c; } return f3(b); } else return b; } return f2(a); } return f1(arguments[0]);"; var foo = new Function(str); foo(5); }" but did not throw |
| PASS Valid: "if (0) $foo; " |
| PASS Valid: "function f() { if (0) $foo; }" |
| PASS Valid: "if (0) _foo; " |
| PASS Valid: "function f() { if (0) _foo; }" |
| PASS Valid: "if (0) foo$; " |
| PASS Valid: "function f() { if (0) foo$; }" |
| PASS Valid: "if (0) foo_; " |
| PASS Valid: "function f() { if (0) foo_; }" |
| PASS Valid: "if (0) obj.$foo; " |
| PASS Valid: "function f() { if (0) obj.$foo; }" |
| PASS Valid: "if (0) obj._foo; " |
| PASS Valid: "function f() { if (0) obj._foo; }" |
| PASS Valid: "if (0) obj.foo$; " |
| PASS Valid: "function f() { if (0) obj.foo$; }" |
| PASS Valid: "if (0) obj.foo_; " |
| PASS Valid: "function f() { if (0) obj.foo_; }" |
| PASS Valid: "if (0) obj.foo\u03bb; " |
| PASS Valid: "function f() { if (0) obj.foo\u03bb; }" |
| PASS Valid: "if (0) new a(b+c).d = 5" |
| PASS Valid: "function f() { if (0) new a(b+c).d = 5 }" |
| PASS Valid: "if (0) new a(b+c) = 5" |
| PASS Valid: "function f() { if (0) new a(b+c) = 5 }" |
| PASS Valid: "([1 || 1].a = 1)" |
| PASS Valid: "function f() { ([1 || 1].a = 1) }" |
| PASS Valid: "({a: 1 || 1}.a = 1)" |
| PASS Valid: "function f() { ({a: 1 || 1}.a = 1) }" |
| PASS Invalid: "var a.b = c" |
| PASS Invalid: "function f() { var a.b = c }" |
| PASS Invalid: "var a.b;" |
| PASS Invalid: "function f() { var a.b; }" |
| PASS Valid: "for (of of of){}" with ReferenceError |
| PASS Valid: "function f() { for (of of of){} }" |
| PASS Valid: "for (of; of; of){}" with ReferenceError |
| PASS Valid: "function f() { for (of; of; of){} }" |
| PASS Valid: "for (var of of of){}" with TypeError |
| PASS Valid: "function f() { for (var of of of){} }" |
| PASS Valid: "for (var of; of; of){}" |
| PASS Valid: "function f() { for (var of; of; of){} }" |
| PASS Invalid: "for (var of.of of of){}" |
| PASS Invalid: "function f() { for (var of.of of of){} }" |
| PASS Invalid: "for (var of[of] of of){}" |
| PASS Invalid: "function f() { for (var of[of] of of){} }" |
| PASS Valid: "for (of.of of of){}" with ReferenceError |
| PASS Valid: "function f() { for (of.of of of){} }" |
| PASS Valid: "for (of[of] of of){}" with ReferenceError |
| PASS Valid: "function f() { for (of[of] of of){} }" |
| PASS Valid: "for (var [of] of of){}" with TypeError |
| PASS Valid: "function f() { for (var [of] of of){} }" |
| PASS Valid: "for (var {of} of of){}" with TypeError |
| PASS Valid: "function f() { for (var {of} of of){} }" |
| PASS Valid: "for (of in of){}" with ReferenceError |
| PASS Valid: "function f() { for (of in of){} }" |
| PASS Valid: "for (var of in of){}" |
| PASS Valid: "function f() { for (var of in of){} }" |
| PASS Invalid: "for (var of.of in of){}" |
| PASS Invalid: "function f() { for (var of.of in of){} }" |
| PASS Valid: "for (of.of in of){}" with ReferenceError |
| PASS Valid: "function f() { for (of.of in of){} }" |
| PASS Valid: "for (of[of] in of){}" with ReferenceError |
| PASS Valid: "function f() { for (of[of] in of){} }" |
| PASS Invalid: "for (var of[of] in of){}" |
| PASS Invalid: "function f() { for (var of[of] in of){} }" |
| PASS Valid: "for (var [of] in of){}" |
| PASS Valid: "function f() { for (var [of] in of){} }" |
| PASS Valid: "for (var {of} in of){}" |
| PASS Valid: "function f() { for (var {of} in of){} }" |
| PASS Valid: "for ([of] in of){}" with ReferenceError |
| PASS Valid: "function f() { for ([of] in of){} }" |
| PASS Valid: "for ({of} in of){}" with ReferenceError |
| PASS Valid: "function f() { for ({of} in of){} }" |
| PASS Invalid: "for (var of = x of of){}" |
| PASS Invalid: "function f() { for (var of = x of of){} }" |
| PASS Invalid: "for (var {of} = x of of){}" |
| PASS Invalid: "function f() { for (var {of} = x of of){} }" |
| PASS Invalid: "for (var [of] = x of of){}" |
| PASS Invalid: "function f() { for (var [of] = x of of){} }" |
| PASS Invalid: "for (of of of of){}" |
| PASS Invalid: "function f() { for (of of of of){} }" |
| PASS Invalid: "for (of of; of; of){}" |
| PASS Invalid: "function f() { for (of of; of; of){} }" |
| PASS Invalid: "for (of of []; of; of){}" |
| PASS Invalid: "function f() { for (of of []; of; of){} }" |
| PASS Invalid: "for (of of){}" |
| PASS Invalid: "function f() { for (of of){} }" |
| PASS Invalid: "for (var of of){}" |
| PASS Invalid: "function f() { for (var of of){} }" |
| PASS Invalid: "for (of of in of){}" |
| PASS Invalid: "function f() { for (of of in of){} }" |
| PASS Invalid: "for (of in){}" |
| PASS Invalid: "function f() { for (of in){} }" |
| PASS Invalid: "for (var of in){}" |
| PASS Invalid: "function f() { for (var of in){} }" |
| spread operator |
| PASS Valid: "foo(...bar)" with ReferenceError |
| PASS Valid: "function f() { foo(...bar) }" |
| PASS Valid: "o.foo(...bar)" with ReferenceError |
| PASS Valid: "function f() { o.foo(...bar) }" |
| PASS Valid: "o[foo](...bar)" with ReferenceError |
| PASS Valid: "function f() { o[foo](...bar) }" |
| PASS Valid: "new foo(...bar)" with ReferenceError |
| PASS Valid: "function f() { new foo(...bar) }" |
| PASS Valid: "new o.foo(...bar)" with ReferenceError |
| PASS Valid: "function f() { new o.foo(...bar) }" |
| PASS Valid: "new o[foo](...bar)" with ReferenceError |
| PASS Valid: "function f() { new o[foo](...bar) }" |
| PASS Invalid: "foo(...)" |
| PASS Invalid: "function f() { foo(...) }" |
| PASS Invalid: "o.foo(...)" |
| PASS Invalid: "function f() { o.foo(...) }" |
| PASS Invalid: "o[foo](...)" |
| PASS Invalid: "function f() { o[foo](...) }" |
| PASS Invalid: "foo(bar...)" |
| PASS Invalid: "function f() { foo(bar...) }" |
| PASS Invalid: "o.foo(bar...)" |
| PASS Invalid: "function f() { o.foo(bar...) }" |
| PASS Invalid: "o[foo](bar...)" |
| PASS Invalid: "function f() { o[foo](bar...) }" |
| PASS Invalid: "foo(a,...bar)" |
| PASS Invalid: "function f() { foo(a,...bar) }" |
| PASS Invalid: "o.foo(a,...bar)" |
| PASS Invalid: "function f() { o.foo(a,...bar) }" |
| PASS Invalid: "o[foo](a,...bar)" |
| PASS Invalid: "function f() { o[foo](a,...bar) }" |
| PASS Invalid: "foo(...bar, a)" |
| PASS Invalid: "function f() { foo(...bar, a) }" |
| PASS Invalid: "o.foo(...bar, a)" |
| PASS Invalid: "function f() { o.foo(...bar, a) }" |
| PASS Invalid: "o[foo](...bar, a)" |
| PASS Invalid: "function f() { o[foo](...bar, a) }" |
| PASS Valid: "[...bar]" with ReferenceError |
| PASS Valid: "function f() { [...bar] }" |
| PASS Valid: "[a, ...bar]" with ReferenceError |
| PASS Valid: "function f() { [a, ...bar] }" |
| PASS Valid: "[...bar, a]" with ReferenceError |
| PASS Valid: "function f() { [...bar, a] }" |
| PASS Valid: "[...bar,,,,]" with ReferenceError |
| PASS Valid: "function f() { [...bar,,,,] }" |
| PASS Valid: "[,,,,...bar]" with ReferenceError |
| PASS Valid: "function f() { [,,,,...bar] }" |
| PASS Valid: "({1: x})" with ReferenceError |
| PASS Valid: "function f() { ({1: x}) }" |
| PASS Valid: "({1: x}=1)" |
| PASS Valid: "function f() { ({1: x}=1) }" |
| PASS Valid: "({1: x}=null)" with TypeError |
| PASS Valid: "function f() { ({1: x}=null) }" |
| PASS Valid: "({1: x})" |
| PASS Valid: "function f() { ({1: x}) }" |
| PASS Valid: "({1: x}=1)" |
| PASS Valid: "function f() { ({1: x}=1) }" |
| PASS Valid: "({1: x}=null)" with TypeError |
| PASS Valid: "function f() { ({1: x}=null) }" |
| PASS Valid: "({a: b}=null)" with TypeError |
| PASS Valid: "function f() { ({a: b}=null) }" |
| PASS Valid: "'use strict'; ({1: x})" |
| PASS Valid: "function f() { 'use strict'; ({1: x}) }" |
| PASS Valid: "'use strict'; ({1: x}=1)" |
| PASS Valid: "function f() { 'use strict'; ({1: x}=1) }" |
| PASS Valid: "'use strict'; ({1: x}=null)" with TypeError |
| PASS Valid: "function f() { 'use strict'; ({1: x}=null) }" |
| PASS Valid: "'use strict'; ({a: b}=null)" with TypeError |
| PASS Valid: "function f() { 'use strict'; ({a: b}=null) }" |
| PASS Valid: "var {1:x}=1" |
| PASS Valid: "function f() { var {1:x}=1 }" |
| PASS Valid: "var {x}=1" |
| PASS Valid: "function f() { var {x}=1 }" |
| PASS Valid: "var {x, y}=1" |
| PASS Valid: "function f() { var {x, y}=1 }" |
| PASS Valid: "var [x]=1" with TypeError |
| PASS Valid: "function f() { var [x]=1 }" |
| PASS Valid: "var [x, y]=1" with TypeError |
| PASS Valid: "function f() { var [x, y]=1 }" |
| PASS Valid: "[x]=1" with TypeError |
| PASS Valid: "function f() { [x]=1 }" |
| PASS Valid: "var [x]=1" with TypeError |
| PASS Valid: "function f() { var [x]=1 }" |
| PASS Valid: "({[x]: 1})" |
| PASS Valid: "function f() { ({[x]: 1}) }" |
| PASS Valid: "delete ({a}=1)" |
| PASS Valid: "function f() { delete ({a}=1) }" |
| PASS Valid: "delete ({a:a}=1)" |
| PASS Valid: "function f() { delete ({a:a}=1) }" |
| PASS Valid: "({a}=1)()" with TypeError |
| PASS Valid: "function f() { ({a}=1)() }" |
| PASS Valid: "({a:a}=1)()" with TypeError |
| PASS Valid: "function f() { ({a:a}=1)() }" |
| PASS Valid: "({a}=1)=1" with ReferenceError |
| PASS Valid: "function f() { ({a}=1)=1 }" |
| PASS Valid: "({a:a}=1)=1" with ReferenceError |
| PASS Valid: "function f() { ({a:a}=1)=1 }" |
| PASS Valid: "({a}=1=1)" with ReferenceError |
| PASS Valid: "function f() { ({a}=1=1) }" |
| PASS Valid: "({a:a}=1=1)" with ReferenceError |
| PASS Valid: "function f() { ({a:a}=1=1) }" |
| PASS Invalid: "var {x}" |
| PASS Invalid: "function f() { var {x} }" |
| PASS Invalid: "var {x, y}" |
| PASS Invalid: "function f() { var {x, y} }" |
| PASS Invalid: "var {x} = 20, {x, y}" |
| PASS Invalid: "function f() { var {x} = 20, {x, y} }" |
| PASS Invalid: "var {foo:bar, bar:baz}" |
| PASS Invalid: "function f() { var {foo:bar, bar:baz} }" |
| PASS Invalid: "var [x]" |
| PASS Invalid: "function f() { var [x] }" |
| PASS Invalid: "var [x, y]" |
| PASS Invalid: "function f() { var [x, y] }" |
| PASS Invalid: "var [x] = [], [x, y]" |
| PASS Invalid: "function f() { var [x] = [], [x, y] }" |
| PASS Valid: "({get x(){}})" |
| PASS Valid: "function f() { ({get x(){}}) }" |
| PASS Valid: "({set x(x){}})" |
| PASS Valid: "function f() { ({set x(x){}}) }" |
| PASS Invalid: "({get x(a){}})" |
| PASS Invalid: "function f() { ({get x(a){}}) }" |
| PASS Invalid: "({get x(a,b){}})" |
| PASS Invalid: "function f() { ({get x(a,b){}}) }" |
| PASS Invalid: "({set x(){}})" |
| PASS Invalid: "function f() { ({set x(){}}) }" |
| PASS Invalid: "({set x(a,b){}})" |
| PASS Invalid: "function f() { ({set x(a,b){}}) }" |
| PASS Valid: "({get [x](){}})" |
| PASS Valid: "function f() { ({get [x](){}}) }" |
| PASS Invalid: "({get [x (){}})" |
| PASS Invalid: "function f() { ({get [x (){}}) }" |
| PASS Invalid: "({set [x](){}})" |
| PASS Invalid: "function f() { ({set [x](){}}) }" |
| PASS Valid: "({set [x](x){}})" |
| PASS Valid: "function f() { ({set [x](x){}}) }" |
| PASS Invalid: "({set [x (x){}})" |
| PASS Invalid: "function f() { ({set [x (x){}}) }" |
| PASS Invalid: "({[...x]: 1})" |
| PASS Invalid: "function f() { ({[...x]: 1}) }" |
| PASS Invalid: "function f({a, a}) {}" |
| PASS Invalid: "function f() { function f({a, a}) {} }" |
| PASS Invalid: "function f({a}, a) {}" |
| PASS Invalid: "function f() { function f({a}, a) {} }" |
| PASS Invalid: "function f([b, b]) {}" |
| PASS Invalid: "function f() { function f([b, b]) {} }" |
| PASS Invalid: "function f([b], b) {}" |
| PASS Invalid: "function f() { function f([b], b) {} }" |
| PASS Invalid: "function f({a: {b}}, b) {}" |
| PASS Invalid: "function f() { function f({a: {b}}, b) {} }" |
| PASS Valid: "function f(a, b = 20) {}" |
| PASS Valid: "function f() { function f(a, b = 20) {} }" |
| PASS Valid: "function f(a = 20, b = a) {}" |
| PASS Valid: "function f() { function f(a = 20, b = a) {} }" |
| PASS Valid: "function f({a = 20} = {a: 40}, b = a) {}" |
| PASS Valid: "function f() { function f({a = 20} = {a: 40}, b = a) {} }" |
| PASS Valid: "function f([a,b,c] = [1,2,3]) {}" |
| PASS Valid: "function f() { function f([a,b,c] = [1,2,3]) {} }" |
| PASS Invalid: "function f(a, a=20) {}" |
| PASS Invalid: "function f() { function f(a, a=20) {} }" |
| PASS Invalid: "function f({a} = 20, a=20) {}" |
| PASS Invalid: "function f() { function f({a} = 20, a=20) {} }" |
| PASS Invalid: "function f([a,b,a] = [1,2,3]) {}" |
| PASS Invalid: "function f() { function f([a,b,a] = [1,2,3]) {} }" |
| PASS Invalid: "function f([a,b,c] = [1,2,3], a) {}" |
| PASS Invalid: "function f() { function f([a,b,c] = [1,2,3], a) {} }" |
| PASS Invalid: "function f([a,b,c] = [1,2,3], {a}) {}" |
| PASS Invalid: "function f() { function f([a,b,c] = [1,2,3], {a}) {} }" |
| PASS Valid: "( function(){ return this || eval('this'); }().x = 'y' )" |
| PASS Valid: "function f() { ( function(){ return this || eval('this'); }().x = 'y' ) }" |
| PASS Invalid: "function(){ return this || eval('this'); }().x = 'y'" |
| PASS Invalid: "function f() { function(){ return this || eval('this'); }().x = 'y' }" |
| PASS Invalid: "1 % +" |
| PASS Invalid: "function f() { 1 % + }" |
| PASS Invalid: "1 % -" |
| PASS Invalid: "function f() { 1 % - }" |
| PASS Invalid: "1 % typeof" |
| PASS Invalid: "function f() { 1 % typeof }" |
| PASS Invalid: "1 % void" |
| PASS Invalid: "function f() { 1 % void }" |
| PASS Invalid: "1 % !" |
| PASS Invalid: "function f() { 1 % ! }" |
| PASS Invalid: "1 % ~" |
| PASS Invalid: "function f() { 1 % ~ }" |
| PASS Invalid: "1 % delete" |
| PASS Invalid: "function f() { 1 % delete }" |
| PASS Invalid: "1 % ++" |
| PASS Invalid: "function f() { 1 % ++ }" |
| PASS Invalid: "1 % --" |
| PASS Invalid: "function f() { 1 % -- }" |
| PASS Invalid: "1 % |
| ++" |
| PASS Invalid: "function f() { 1 % |
| ++ }" |
| PASS Invalid: "1 % |
| --" |
| PASS Invalid: "function f() { 1 % |
| -- }" |
| PASS e.line is 1 |
| PASS foo is 'PASS' |
| PASS bar is 'PASS' |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |