diff --git a/test/language/statements/block/12.1-1.js b/test/language/statements/block/12.1-1.js index 0f1ddd0237..d5f0106ca7 100644 --- a/test/language/statements/block/12.1-1.js +++ b/test/language/statements/block/12.1-1.js @@ -4,9 +4,11 @@ /*--- es5id: 12.1-1 description: "12.1 - block '{ StatementListopt };' is not allowed: try-catch" +negative: + phase: parse + type: SyntaxError ---*/ +$DONOTEVALUATE(); -assert.throws(SyntaxError, function() { - eval("try{};catch(){}"); -}); +try{};catch(){} diff --git a/test/language/statements/block/12.1-2.js b/test/language/statements/block/12.1-2.js index b0b41000c4..da123633b6 100644 --- a/test/language/statements/block/12.1-2.js +++ b/test/language/statements/block/12.1-2.js @@ -6,9 +6,11 @@ es5id: 12.1-2 description: > 12.1 - block '{ StatementListopt };' is not allowed: try-catch-finally +negative: + phase: parse + type: SyntaxError ---*/ +$DONOTEVALUATE(); -assert.throws(SyntaxError, function() { - eval("try{};catch{};finally{}"); -}); +try{};catch{};finally{} diff --git a/test/language/statements/block/12.1-3.js b/test/language/statements/block/12.1-3.js index a7fb97e72e..64e836759c 100644 --- a/test/language/statements/block/12.1-3.js +++ b/test/language/statements/block/12.1-3.js @@ -4,9 +4,11 @@ /*--- es5id: 12.1-3 description: "12.1 - block '{ StatementListopt };' is not allowed: try-finally" +negative: + phase: parse + type: SyntaxError ---*/ +$DONOTEVALUATE(); -assert.throws(SyntaxError, function() { - eval("try{};finally{}"); -}); +try{};finally{} diff --git a/test/language/statements/block/12.1-4.js b/test/language/statements/block/12.1-4.js index bf130e4594..eb7edd744f 100644 --- a/test/language/statements/block/12.1-4.js +++ b/test/language/statements/block/12.1-4.js @@ -4,9 +4,11 @@ /*--- es5id: 12.1-4 description: "12.1 - block '{ StatementListopt };' is not allowed: if-else" +negative: + phase: parse + type: SyntaxError ---*/ +$DONOTEVALUATE(); -assert.throws(SyntaxError, function() { - eval("if{};else{}"); -}); +if{};else{} diff --git a/test/language/statements/block/12.1-5.js b/test/language/statements/block/12.1-5.js index 2ac6f46085..4dd7ff5ac1 100644 --- a/test/language/statements/block/12.1-5.js +++ b/test/language/statements/block/12.1-5.js @@ -4,9 +4,11 @@ /*--- es5id: 12.1-5 description: "12.1 - block '{ StatementListopt };' is not allowed: if-else-if" +negative: + phase: parse + type: SyntaxError ---*/ +$DONOTEVALUATE(); -assert.throws(SyntaxError, function() { - eval("if{};else if{}"); -}); +if{};else if{} diff --git a/test/language/statements/block/12.1-6.js b/test/language/statements/block/12.1-6.js index deeffa1710..ef60e90e8f 100644 --- a/test/language/statements/block/12.1-6.js +++ b/test/language/statements/block/12.1-6.js @@ -6,9 +6,11 @@ es5id: 12.1-6 description: > 12.1 - block '{ StatementListopt };' is not allowed: if-else-if-else +negative: + phase: parse + type: SyntaxError ---*/ +$DONOTEVALUATE(); -assert.throws(SyntaxError, function() { - eval("if{};else if{};else{}"); -}); +if{};else if{};else{} diff --git a/test/language/statements/block/12.1-7.js b/test/language/statements/block/12.1-7.js index ee5c6acdfc..345cfd89b2 100644 --- a/test/language/statements/block/12.1-7.js +++ b/test/language/statements/block/12.1-7.js @@ -4,9 +4,11 @@ /*--- es5id: 12.1-7 description: "12.1 - block '{ StatementListopt };' is not allowed: do-while" +negative: + phase: parse + type: SyntaxError ---*/ +$DONOTEVALUATE(); -assert.throws(SyntaxError, function() { - eval("do{};while()"); -}); +do{};while() diff --git a/test/language/statements/break/S12.8_A2.js b/test/language/statements/break/S12.8_A2.js deleted file mode 100644 index 0d1bc5ef3b..0000000000 --- a/test/language/statements/break/S12.8_A2.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - Since LineTerminator between "break" and Identifier is not allowed, - "break" is evaluated without label -es5id: 12.8_A2 -description: > - Checking by using eval, inserting LineTerminator between break and - Identifier ----*/ - -var result; - -////////////////////////////////////////////////////////////////////////////// -//CHECK#1 -try{ - eval("FOR1 : for(var i=1;i<2;i++){ LABEL1 : do {var x =1;break\u000AFOR1;var y=2;} while(0);} result = i;"); - if (result!==2) { - $ERROR('#1: Since LineTerminator(U-000A) between break and Identifier not allowed break evaluates without label'); - } -} catch(e){ - $ERROR('#1.1: eval("FOR1 : for(var i=1;i<2;i++){ LABEL1 : do {var x =1;break\\u000AFOR1;var y=2;} while(0);}") does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -//CHECK#2 -try{ - eval("FOR2 : for(var i=1;i<2;i++){ LABEL2 : do {var x =1;break\u000DFOR2;var y=2;} while(0);} result = i;"); - if (result!==2) { - $ERROR('#2: Since LineTerminator(U-000D) between break and Identifier not allowed break evaluates without label'); - } -} catch(e){ - $ERROR('#2.1: eval("FOR2 : for(var i=1;i<2;i++){ LABEL2 : do {var x =1;break\\u000DFOR2;var y=2;} while(0);}") does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -//CHECK#3 -try{ - eval("FOR3 : for(var i=1;i<2;i++){ LABEL3 : do {var x =1;break\u2028FOR3;var y=2;} while(0);} result = i;"); - if (result!==2) { - $ERROR('#3: Since LineTerminator(U-2028) between break and Identifier not allowed break evaluates without label'); - } -} catch(e){ - $ERROR('#3.1: eval("FOR3 : for(var i=1;i<2;i++){ LABEL3 : do {var x =1;break\\u2028FOR3;var y=2;} while(0);}") does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -//CHECK#4 -try{ - eval("FOR4 : for(var i=1;i<2;i++){ LABEL4 : do {var x =1;break\u2029FOR4;var y=2;} while(0);} result = i;"); - if (result!==2) { - $ERROR('#4: Since LineTerminator(U-2029) between break and Identifier not allowed break evaluates without label'); - } -} catch(e){ - $ERROR('#4.1: eval("FOR4 : for(var i=1;i<2;i++){ LABEL4 : do {var x =1;break\\u2029FOR4;var y=2;} while(0);}") does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/break/line-terminators.js b/test/language/statements/break/line-terminators.js new file mode 100644 index 0000000000..5b534778c5 --- /dev/null +++ b/test/language/statements/break/line-terminators.js @@ -0,0 +1,45 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Since LineTerminator between "break" and Identifier is not allowed, + "break" is evaluated without label +es5id: 12.8_A2 +description: > + Checking by using eval, inserting LineTerminator between break and + Identifier +---*/ + +FOR1 : for(var i=1;i<2;i++){ + LABEL1 : do { + break +FOR1; + } while(0); +} + +assert.sameValue(i, 2, '#1: Since LineTerminator(U-000A) between break and Identifier not allowed break evaluates without label'); + +FOR2 : for(var i=1;i<2;i++){ + LABEL2 : do { + break FOR2; + } while(0); +} + +assert.sameValue(i, 2, '#2: Since LineTerminator(U-000D) between break and Identifier not allowed break evaluates without label'); + +FOR3 : for(var i=1;i<2;i++){ + LABEL3 : do { + break
FOR3; + } while(0); +} + +assert.sameValue(i, 2, '#3: Since LineTerminator(U-2028) between break and Identifier not allowed break evaluates without label'); + +FOR4 : for(var i=1;i<2;i++){ + LABEL4 : do { + break
FOR4; + } while(0); +} + +assert.sameValue(i, 2, '#4: Since LineTerminator(U-2029) between break and Identifier not allowed break evaluates without label'); diff --git a/test/language/statements/continue/S12.7_A2.js b/test/language/statements/continue/S12.7_A2.js deleted file mode 100644 index 7cefe290ab..0000000000 --- a/test/language/statements/continue/S12.7_A2.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - Since LineTerminator between "continue" and Identifier is not allowed, - "continue" is evaluated without label -es5id: 12.7_A2 -description: > - Checking by using eval, inserting LineTerminator between continue - and Identifier ----*/ - -var result; - -////////////////////////////////////////////////////////////////////////////// -//CHECK#1 -try{ - eval("FOR1 : for(var i=1;i<2;i++){FOR1NESTED : for(var j=1;j<2;j++) { continue\u000AFOR1; } while(0);} result = j;"); - if (result!==2) { - $ERROR('#1: Since LineTerminator(U-000A) between continue and Identifier not allowed continue evaluates without label'); - } -} catch(e){ - $ERROR('#1.1: eval("FOR1 : for(var i=1;i<2;i++){FOR1NESTED : for(var j=1;j<2;j++) { continue\\u000AFOR1; } while(0);}") does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -//CHECK#2 -try{ - eval("FOR2 : for(var i=1;i<2;i++){FOR2NESTED : for(var j=1;j<2;j++) { continue\u000DFOR2; } while(0);} result = j;"); - if (result!==2) { - $ERROR('#2: Since LineTerminator(U-000D) between continue and Identifier not allowed continue evaluates without label'); - } -} catch(e){ - $ERROR('#2.1: eval("FOR2 : for(var i=1;i<2;i++){FOR2NESTED : for(var j=1;j<2;j++) { continue\\u000DFOR2; } while(0);}") does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -//CHECK#3 -try{ - eval("FOR3 : for(var i=1;i<2;i++){FOR3NESTED : for(var j=1;j<2;j++) { continue\u2028FOR3; } while(0);} result = j;"); - if (result!==2) { - $ERROR('#3: Since LineTerminator(U-2028) between continue and Identifier not allowed continue evaluates without label'); - } -} catch(e){ - $ERROR('#3.1: eval("FOR3 : for(var i=1;i<2;i++){FOR3NESTED : for(var j=1;j<2;j++) { continue\\u2028FOR3; } while(0);}") does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// - -////////////////////////////////////////////////////////////////////////////// -//CHECK#4 -try{ - eval("FOR4 : for(var i=1;i<2;i++){FOR4NESTED : for(var j=1;j<2;j++) { continue\u2029FOR4; } while(0);} result = j;"); - if (result!==2) { - $ERROR('#4: Since LineTerminator(U-2029) between continue and Identifier not allowed continue evaluates without label'); - } -} catch(e){ - $ERROR('#4.1: eval("FOR4 : for(var i=1;i<2;i++){FOR4NESTED : for(var j=1;j<2;j++) { continue\\u2029FOR4; } while(0);}"); does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/continue/line-terminators.js b/test/language/statements/continue/line-terminators.js new file mode 100644 index 0000000000..f3fb86f6fd --- /dev/null +++ b/test/language/statements/continue/line-terminators.js @@ -0,0 +1,44 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Since LineTerminator between "continue" and Identifier is not allowed, + "continue" is evaluated without label +es5id: 12.7_A2 +description: > + Checking by using eval, inserting LineTerminator between continue + and Identifier +---*/ + +FOR1 : for(var i=1;i<2;i++){ + FOR1NESTED : for(var j=1;j<2;j++) { + continue +FOR1; + } while(0); +} + +assert.sameValue(j, 2, '#1: Since LineTerminator(U-000A) between continue and Identifier not allowed continue evaluates without label'); + +FOR2 : for(var i=1;i<2;i++){ + FOR2NESTED : for(var j=1;j<2;j++) { + continue FOR2; + } while(0); +} + +assert.sameValue(j, 2, '#2: Since LineTerminator(U-000D) between continue and Identifier not allowed continue evaluates without label'); + +FOR3 : for(var i=1;i<2;i++){ + FOR3NESTED : for(var j=1;j<2;j++) { + continue
FOR3; + } while(0); +} +assert.sameValue(j, 2, '#3: Since LineTerminator(U-2028) between continue and Identifier not allowed continue evaluates without label'); + +FOR4 : for(var i=1;i<2;i++){ + FOR4NESTED : for(var j=1;j<2;j++) { + continue
FOR4; + } while(0); +} + +assert.sameValue(j, 2, '#4: Since LineTerminator(U-2029) between continue and Identifier not allowed continue evaluates without label'); diff --git a/test/language/statements/for/S12.6.3_A9.1.js b/test/language/statements/for/S12.6.3_A9.1.js deleted file mode 100644 index 3494167bdf..0000000000 --- a/test/language/statements/for/S12.6.3_A9.1.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - The result of evaluating "for( ExpNoIn;Exp;Exp)" loop is returning - (normal, evalValue, empty) -es5id: 12.6.3_A9.1 -description: Using eval ----*/ - -var supreme, count; -supreme=5; - -////////////////////////////////////////////////////////////////////////////// -//CHECK# -try { - var __evaluated = eval("for(count=0;;) {if (count===supreme)break;else count++; }"); - if (__evaluated !== void 0) { - $ERROR('#1: __evaluated === 4. Actual: __evaluated ==='+ __evaluated ); - } -} catch (e) { - $ERROR('#1: var __evaluated = eval("for(count=0;;) {if (count===supreme)break;else count++; }"); does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/for/S12.6.3_A9.js b/test/language/statements/for/S12.6.3_A9.js deleted file mode 100644 index ef8072adb8..0000000000 --- a/test/language/statements/for/S12.6.3_A9.js +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - The result of evaluating "for(var ExpNoIn;Exp;Exp)" loop is returning - (normal, evalValue, empty) -es5id: 12.6.3_A9 -description: Using eval ----*/ - -var supreme; -supreme=5; - -////////////////////////////////////////////////////////////////////////////// -//CHECK# -try { - var __evaluated = eval("for(var count=0;;) {if (count===supreme)break;else count++; }"); - if (__evaluated !== void 0) { - $ERROR('#1: __evaluated === 4. Actual: __evaluated ==='+ __evaluated ); - } -} catch (e) { - $ERROR('#1: var __evaluated = eval("for(var count=0;;) {if (count===supreme)break;else count++; }"); does not lead to throwing exception'); -} -// -////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/for/head-init-expr-check-empty-inc-empty-completion.js b/test/language/statements/for/head-init-expr-check-empty-inc-empty-completion.js new file mode 100644 index 0000000000..3ae297fc93 --- /dev/null +++ b/test/language/statements/for/head-init-expr-check-empty-inc-empty-completion.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + The result of evaluating "for( ExpNoIn;Exp;Exp)" loop is returning + (normal, evalValue, empty) +es5id: 12.6.3_A9.1 +description: Using eval +---*/ + +var supreme, count; +supreme=5; + +var __evaluated = eval("for(count=0;;) {if (count===supreme)break;else count++; }"); + +assert.sameValue(__evaluated, void 0, '#1: __evaluated === 4. Actual: __evaluated ==='+ __evaluated); diff --git a/test/language/statements/for/head-init-expr-check-empty-inc-empty-syntax.js b/test/language/statements/for/head-init-expr-check-empty-inc-empty-syntax.js new file mode 100644 index 0000000000..cb7e692128 --- /dev/null +++ b/test/language/statements/for/head-init-expr-check-empty-inc-empty-syntax.js @@ -0,0 +1,13 @@ +// Copyright 2019 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: For head may omit optional expressions +es5id: 12.6.3_A9.1 +---*/ + + +var supreme = 5 +var count; + +for(count=0;;) {if (count===supreme)break;else count++; } diff --git a/test/language/statements/for/head-init-var-check-empty-inc-empty-completion.js b/test/language/statements/for/head-init-var-check-empty-inc-empty-completion.js new file mode 100644 index 0000000000..95d1d73401 --- /dev/null +++ b/test/language/statements/for/head-init-var-check-empty-inc-empty-completion.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + The result of evaluating "for(var ExpNoIn;Exp;Exp)" loop is returning + (normal, evalValue, empty) +es5id: 12.6.3_A9 +description: Using eval +---*/ + +var supreme=5; + +var __evaluated = eval("for(var count=0;;) {if (count===supreme)break;else count++; }"); + +assert.sameValue(__evaluated, void 0, '#1: __evaluated === 4. Actual: __evaluated ==='+ __evaluated ); diff --git a/test/language/statements/for/head-init-var-check-empty-inc-empty-syntax.js b/test/language/statements/for/head-init-var-check-empty-inc-empty-syntax.js new file mode 100644 index 0000000000..fa41e29288 --- /dev/null +++ b/test/language/statements/for/head-init-var-check-empty-inc-empty-syntax.js @@ -0,0 +1,11 @@ +// Copyright 2019 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: For head may omit optional expressions +es5id: 12.6.3_A9 +---*/ + +var supreme=5; + +for(var count=0;;) {if (count===supreme)break;else count++; } diff --git a/test/language/statements/if/S12.5_A7.js b/test/language/statements/if/S12.5_A7.js deleted file mode 100644 index 32189bbbe1..0000000000 --- a/test/language/statements/if/S12.5_A7.js +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - In the "if" statement empty statement is allowed and is evaluated to - "undefined" -es5id: 12.5_A7 -description: Checking by using eval "eval("if(1);"))" ----*/ - -////////////////////////////////////////////////////////////////////////////// -//CHECK#1 -try { - var __evaluated = eval("if(1);"); - if (__evaluated !== undefined) { - $ERROR('#1: __evaluated === undefined. Actual: __evaluated ==='+ __evaluated ); - } - -} catch (e) { - $ERROR('#1.1: "__evaluated = eval("if(1);")" does not lead to throwing exception'); - -} -// -////////////////////////////////////////////////////////////////////////////// diff --git a/test/language/statements/if/cptn-empty-statement.js b/test/language/statements/if/cptn-empty-statement.js new file mode 100644 index 0000000000..1e4895dc5b --- /dev/null +++ b/test/language/statements/if/cptn-empty-statement.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + In the "if" statement empty statement is allowed and is evaluated to + "undefined" +es5id: 12.5_A7 +description: Checking by using eval "eval("if(1);"))" +---*/ + +var __evaluated = eval("if(1);"); + +assert.sameValue(__evaluated, undefined, '#1: __evaluated === undefined. Actual: __evaluated ==='+ __evaluated); diff --git a/test/language/statements/if/empty-statement.js b/test/language/statements/if/empty-statement.js new file mode 100644 index 0000000000..c8a1b04fcd --- /dev/null +++ b/test/language/statements/if/empty-statement.js @@ -0,0 +1,9 @@ +// Copyright 2019 Mike Pennisi. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +description: In the "if" statement empty statement is allowed. +es5id: 12.5_A7 +---*/ + +if(1); diff --git a/test/language/statements/return/S12.9_A2.js b/test/language/statements/return/S12.9_A2.js deleted file mode 100644 index 64b73fd6dc..0000000000 --- a/test/language/statements/return/S12.9_A2.js +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - LineTerminator between return and Identifier_opt yields return without - Identifier_opt -es5id: 12.9_A2 -description: > - Checking by using eval, inserting LineTerminator between return - and Variable ----*/ - -//CHECK#1 -try{ - if (eval("(function(){var x = 1;return\u000Ax;var y=2;})()") !== undefined) { - $ERROR("#1: LineTerminator(U-000A) between return and Identifier_opt yields return without Identifier_opt"); - } -} catch(e){ - $ERROR('#1: eval("(function(){var x = 1;return\\u000Ax;var y=2;})()") does not lead to throwing exception'); -} - - - - -//CHECK#2 -try{ - if (eval("(function(){var x = 1;return\u000Dx;var y=2;})()") !== undefined) { - $ERROR("#1: LineTerminator(U-000D) between return and Identifier_opt yields return without Identifier_opt"); - } -} catch(e){ - $ERROR('#2: eval("(function(){var x = 1;return\\u000Dx;var y=2;})()") does not lead to throwing exception'); -} - - - - -//CHECK#3 -try{ - if (eval("(function(){var x = 1;return\u2028x;var y=2;})()") !== undefined) { - $ERROR("#1: LineTerminator(U-2028) between return and Identifier_opt yields return without Identifier_opt"); - } -} catch(e){ - $ERROR('#3: eval("(function(){var x = 1;return\\u2028x;var y=2;})()") does not lead to throwing exception'); -} - - - - -//CHECK#4 -try{ - if (eval("(function(){var x =1;return\u2029x;var y=2;})()") !== undefined) { - $ERROR("#1: LineTerminator(U-2029) between return and Identifier_opt yields return without Identifier_opt"); - } -} catch(e){ - $ERROR('#4: eval("(function(){var x =1;return\\u2029x;var y=2;})()") does not lead to throwing exception'); -} diff --git a/test/language/statements/return/line-terminators.js b/test/language/statements/return/line-terminators.js new file mode 100644 index 0000000000..640f859397 --- /dev/null +++ b/test/language/statements/return/line-terminators.js @@ -0,0 +1,36 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + LineTerminator between return and Identifier_opt yields return without + Identifier_opt +es5id: 12.9_A2 +description: Inserting LineTerminator between return and Variable +---*/ + +assert.sameValue( + function(){ return +1; }(), + undefined, + "#1: LineTerminator(U-000A) between return and Identifier_opt yields return without Identifier_opt" +); + +assert.sameValue( + function(){ return 1; }(), + undefined, + "#1: LineTerminator(U-000D) between return and Identifier_opt yields return without Identifier_opt" +); + + +assert.sameValue( + function(){ return
1; }(), + undefined, + "#1: LineTerminator(U-2028) between return and Identifier_opt yields return without Identifier_opt" +); + +assert.sameValue( + function(){ return
1; }(), + undefined, + "#1: LineTerminator(U-2029) between return and Identifier_opt yields return without Identifier_opt" +);