| Tests for ES6 "let" |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS Does not have syntax error: 'let x = 20; if (truth()) { let x = 30; }' |
| PASS Does not have syntax error: ''use strict'; let x = 20; if (truth()) { let x = 30; }' |
| PASS Does not have syntax error: 'let {x} = {x:20}; if (truth()) { let {x} = {x : 20}; }' |
| PASS Does not have syntax error: ''use strict'; let {x} = {x:20}; if (truth()) { let {x} = {x : 20}; }' |
| PASS Does not have syntax error: 'let {x} = {x:20}; if (truth()) { let {y: x} = {y : 20}; }' |
| PASS Does not have syntax error: ''use strict'; let {x} = {x:20}; if (truth()) { let {y: x} = {y : 20}; }' |
| PASS Does not have syntax error: 'let {x, y: [arr]} = {x:20, y: [10]}; if (truth()) { let {y: x} = {y : 20}; }' |
| PASS Does not have syntax error: ''use strict'; let {x, y: [arr]} = {x:20, y: [10]}; if (truth()) { let {y: x} = {y : 20}; }' |
| PASS Does not have syntax error: 'let i = 40; for (let i = 1; i < 2; i++) { let i = 40; i; }' |
| PASS Does not have syntax error: ''use strict'; let i = 40; for (let i = 1; i < 2; i++) { let i = 40; i; }' |
| PASS Does not have syntax error: 'let i = 40; let obj = {}; for (let i in obj) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: ''use strict'; let i = 40; let obj = {}; for (let i in obj) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: 'let i = 40; let obj = []; for (let i of obj) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: ''use strict'; let i = 40; let obj = []; for (let i of obj) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: 'let {i} = 20; let obj = []; for (let {i} of obj) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: ''use strict'; let {i} = 20; let obj = []; for (let {i} of obj) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: 'let {i} = 20; let obj = []; for (let {i} in obj) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: ''use strict'; let {i} = 20; let obj = []; for (let {i} in obj) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: 'let {i} = 20; let obj = []; for (let {i} = {i: 0}; i < 2; i++) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: ''use strict'; let {i} = 20; let obj = []; for (let {i} = {i: 0}; i < 2; i++) { let i = 40; let obj = {}; i; }' |
| PASS Does not have syntax error: 'function foo() { let foo = 20; }' |
| PASS Does not have syntax error: ''use strict'; function foo() { let foo = 20; }' |
| PASS Does not have syntax error: 'function foo(bar) { if (truth()) { let bar; } }' |
| PASS Does not have syntax error: ''use strict'; function foo(bar) { if (truth()) { let bar; } }' |
| PASS Does not have syntax error: 'function foo() { var bar; if (truth()) { let bar; } }' |
| PASS Does not have syntax error: ''use strict'; function foo() { var bar; if (truth()) { let bar; } }' |
| PASS Does not have syntax error: ';({ get let() { return 50; }, set let(x) { return 50;} });' |
| PASS Does not have syntax error: ''use strict'; ;({ get let() { return 50; }, set let(x) { return 50;} });' |
| PASS Has syntax error: 'let let;' |
| PASS Has syntax error: ''use strict'; let let;' |
| PASS Has syntax error: 'const let;' |
| PASS Has syntax error: ''use strict'; const let;' |
| PASS Has syntax error: 'let {let};' |
| PASS Has syntax error: ''use strict'; let {let};' |
| PASS Has syntax error: 'let {l: let};' |
| PASS Has syntax error: ''use strict'; let {l: let};' |
| PASS Has syntax error: 'let {l: {let}};' |
| PASS Has syntax error: ''use strict'; let {l: {let}};' |
| PASS Has syntax error: 'let {l: [let]};' |
| PASS Has syntax error: ''use strict'; let {l: [let]};' |
| PASS Has syntax error: 'var {let};' |
| PASS Has syntax error: ''use strict'; var {let};' |
| PASS Has syntax error: 'let x, x;' |
| PASS Has syntax error: ''use strict'; let x, x;' |
| PASS Has syntax error: 'let x = 20, y, x = 40;' |
| PASS Has syntax error: ''use strict'; let x = 20, y, x = 40;' |
| PASS Has syntax error: 'let x = 20, y; let x = 40;' |
| PASS Has syntax error: ''use strict'; let x = 20, y; let x = 40;' |
| PASS Has syntax error: 'let x = 20, y, {x} = {};' |
| PASS Has syntax error: ''use strict'; let x = 20, y, {x} = {};' |
| PASS Has syntax error: 'let x = 20, y; let {x} = {};' |
| PASS Has syntax error: ''use strict'; let x = 20, y; let {x} = {};' |
| PASS Has syntax error: 'let {x, y, z, x} = {};' |
| PASS Has syntax error: ''use strict'; let {x, y, z, x} = {};' |
| PASS Has syntax error: 'let {x: xx, y, x: xx} = {};' |
| PASS Has syntax error: ''use strict'; let {x: xx, y, x: xx} = {};' |
| PASS Has syntax error: 'let {x: xx, foo: [xx]} = {foo:[12]};' |
| PASS Has syntax error: ''use strict'; let {x: xx, foo: [xx]} = {foo:[12]};' |
| PASS Has syntax error: 'let {x: xx, foo: {y: xx}} = {foo:[12]};' |
| PASS Has syntax error: ''use strict'; let {x: xx, foo: {y: xx}} = {foo:[12]};' |
| PASS Has syntax error: 'for (let; ; ) {}' |
| PASS Has syntax error: ''use strict'; for (let; ; ) {}' |
| PASS Has syntax error: 'let arr = []; for (let of arr) {}' |
| PASS Has syntax error: ''use strict'; let arr = []; for (let of arr) {}' |
| PASS Has syntax error: 'let obj = {}; for (let in arr) {}' |
| PASS Has syntax error: ''use strict'; let obj = {}; for (let in arr) {}' |
| PASS Has syntax error: 'for (let i = 20, j = 40, i = 10; i < 10; i++) {}' |
| PASS Has syntax error: ''use strict'; for (let i = 20, j = 40, i = 10; i < 10; i++) {}' |
| PASS Has syntax error: 'let x = 20; if (truth()) let x = 40;' |
| PASS Has syntax error: ''use strict'; let x = 20; if (truth()) let x = 40;' |
| PASS Has syntax error: 'let baz = 20; if (truth()) { let x = 20; let x = 40;} ' |
| PASS Has syntax error: ''use strict'; let baz = 20; if (truth()) { let x = 20; let x = 40;} ' |
| PASS Has syntax error: 'function foo() { var bar; let bar; }' |
| PASS Has syntax error: ''use strict'; function foo() { var bar; let bar; }' |
| PASS Has syntax error: 'function foo(bar) { let bar; }' |
| PASS Has syntax error: ''use strict'; function foo(bar) { let bar; }' |
| PASS Has syntax error: 'function foo() {}; let foo;' |
| PASS Has syntax error: ''use strict'; function foo() {}; let foo;' |
| PASS Has syntax error: 'function foo() {}; function bar(){} let baz, {bar} = {};' |
| PASS Has syntax error: ''use strict'; function foo() {}; function bar(){} let baz, {bar} = {};' |
| PASS Has syntax error: 'function foo() {}; function bar(){} let baz, {f: {bar}} = {f:{}};' |
| PASS Has syntax error: ''use strict'; function foo() {}; function bar(){} let baz, {f: {bar}} = {f:{}};' |
| PASS Has syntax error: 'function foo() {}; function bar(){} let baz, {f: [bar]} = {f:[10]};' |
| PASS Has syntax error: ''use strict'; function foo() {}; function bar(){} let baz, {f: [bar]} = {f:[10]};' |
| PASS Has syntax error: 'for (let let = 0; let < 10; let++) {}' |
| PASS Has syntax error: ''use strict'; for (let let = 0; let < 10; let++) {}' |
| PASS Has syntax error: 'for (let of []) {}' |
| PASS Has syntax error: ''use strict'; for (let of []) {}' |
| PASS Has syntax error: 'for (let in {}) {}' |
| PASS Has syntax error: ''use strict'; for (let in {}) {}' |
| PASS Does not have syntax error: 'let;' |
| PASS Has syntax error: ''use strict'; let;' |
| PASS Does not have syntax error: 'var let;' |
| PASS Has syntax error: ''use strict'; var let;' |
| PASS Does not have syntax error: 'var {let} = 40;' |
| PASS Has syntax error: ''use strict'; var {let} = 40;' |
| PASS Does not have syntax error: 'var [let] = 40;' |
| PASS Has syntax error: ''use strict'; var [let] = 40;' |
| PASS Does not have syntax error: 'var {p: let} = 40;' |
| PASS Has syntax error: ''use strict'; var {p: let} = 40;' |
| PASS Does not have syntax error: '(function test(let){});' |
| PASS Has syntax error: ''use strict'; (function test(let){});' |
| PASS Does not have syntax error: 'let: for (v of []) break let;' |
| PASS Has syntax error: ''use strict'; let: for (v of []) break let;' |
| PASS Does not have syntax error: 'let: for (v of []) continue let;' |
| PASS Has syntax error: ''use strict'; let: for (v of []) continue let;' |
| PASS Does not have syntax error: 'let: for (v in {}) break;' |
| PASS Has syntax error: ''use strict'; let: for (v in {}) break;' |
| PASS Does not have syntax error: 'let: for (v in {}) break;' |
| PASS Has syntax error: ''use strict'; let: for (v in {}) break;' |
| PASS Does not have syntax error: 'let: for (var v = 0; false; ) {};' |
| PASS Has syntax error: ''use strict'; let: for (var v = 0; false; ) {};' |
| PASS Does not have syntax error: 'try { } catch(let) {}' |
| PASS Has syntax error: ''use strict'; try { } catch(let) {}' |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |