diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /js/src/tests/test262/language/asi | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/language/asi')
104 files changed, 2054 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/asi/S7.9.2_A1_T1.js b/js/src/tests/test262/language/asi/S7.9.2_A1_T1.js new file mode 100644 index 0000000000..1777a6e948 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9.2_A1_T1.js @@ -0,0 +1,17 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check examples for automatic semicolon insertion from the standard +es5id: 7.9.2_A1_T1 +description: "{ 1 2 } 3 is not a valid sentence in the ECMAScript grammar" +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +{ 1 2 } 3 diff --git a/js/src/tests/test262/language/asi/S7.9.2_A1_T2.js b/js/src/tests/test262/language/asi/S7.9.2_A1_T2.js new file mode 100644 index 0000000000..0f784d918c --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9.2_A1_T2.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: Check examples for automatic semicolon insertion from the standard +es5id: 7.9.2_A1_T2 +description: > + { 1 \n 2 } 3 is a valid sentence in the ECMAScript grammar with + automatic semicolon insertion +---*/ + +//CHECK#1 +{ 1 +2 } 3 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9.2_A1_T3.js b/js/src/tests/test262/language/asi/S7.9.2_A1_T3.js new file mode 100644 index 0000000000..e93dc15234 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9.2_A1_T3.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check examples for automatic semicolon insertion from the standard +es5id: 7.9.2_A1_T3 +description: for( a ; b \n ) is not a valid sentence in the ECMAScript grammar +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( a ; b +) diff --git a/js/src/tests/test262/language/asi/S7.9.2_A1_T4.js b/js/src/tests/test262/language/asi/S7.9.2_A1_T4.js new file mode 100644 index 0000000000..8ae3901e9b --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9.2_A1_T4.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check examples for automatic semicolon insertion from the standard +es5id: 7.9.2_A1_T4 +description: > + return \n a+b is a valid sentence in the ECMAScript grammar with + automatic semicolon insertion, but returned undefined +---*/ + +//CHECK#1 +var a=1,b=2; +function test(){ + return + a+b +} +var x=test(); +if (x!==undefined) $ERROR('#1: Automatic semicolon insertion not work with return'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9.2_A1_T5.js b/js/src/tests/test262/language/asi/S7.9.2_A1_T5.js new file mode 100644 index 0000000000..356b7fa274 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9.2_A1_T5.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check examples for automatic semicolon insertion from the standard +es5id: 7.9.2_A1_T5 +description: > + a=b \n ++c is a valid sentence in the ECMAScript grammar with + automatic semicolon insertion, but a!==b++c +---*/ + +//CHECK#1 +var a=1,b=2,c=3; +a=b +++c + +if (a!==b) $ERROR('#1: Automatic semicolon insertion not work with ++'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9.2_A1_T6.js b/js/src/tests/test262/language/asi/S7.9.2_A1_T6.js new file mode 100644 index 0000000000..aaee577514 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9.2_A1_T6.js @@ -0,0 +1,21 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check examples for automatic semicolon insertion from the standard +es5id: 7.9.2_A1_T6 +description: > + if(a>b) \n else c=d is not a valid sentence in the ECMAScript + grammar +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +var a=1,b=2,c=3,d; +if(a>b) +else c=d diff --git a/js/src/tests/test262/language/asi/S7.9.2_A1_T7.js b/js/src/tests/test262/language/asi/S7.9.2_A1_T7.js new file mode 100644 index 0000000000..e73d14650f --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9.2_A1_T7.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check examples for automatic semicolon insertion from the standard +es5id: 7.9.2_A1_T7 +description: > + a=b+c \n (d+e).print() is a valid sentence in the ECMAScript + grammar, and automatic semicolon insertion not run +---*/ + +//CHECK#1 +function c (a){ + return 2*a; +} + +var a=1,b=2,d=4,e=5; + +a=b+c +(d+e) + +if (a !== 20) $ERROR('#1: Automatic semicolon insertion work wrong'); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A1.js b/js/src/tests/test262/language/asi/S7.9_A1.js new file mode 100644 index 0000000000..947560e2bc --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A1.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Continue Statement for automatic semicolon insertion +es5id: 7.9_A1 +description: Try use continue \n Label construction +---*/ + +//CHECK#1 +label1: for (var i = 0; i <= 0; i++) { + for (var j = 0; j <= 1; j++) { + if (j === 0) { + continue label1; + } else { + $ERROR('#1: Check continue statement for automatic semicolon insertion'); + } + } +} + +//CHECK#2 +var result = false; +label2: for (var i = 0; i <= 1; i++) { + for (var j = 0; j <= 1; j++) { + if (j === 0) { + continue + label2; + } else { + result = true; + } + } +} + +if (result !== true) { + $ERROR('#2: Check continue statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T1.js b/js/src/tests/test262/language/asi/S7.9_A10_T1.js new file mode 100644 index 0000000000..9c6e547c94 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T1.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T1 +description: Checking if execution of "1 * {}" passes +---*/ + +//CHECK#1 +1 * {} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T10.js b/js/src/tests/test262/language/asi/S7.9_A10_T10.js new file mode 100644 index 0000000000..9728fc7b67 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T10.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: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T10 +description: "Checking if execution of \"{a:1 \\n} 3\" passes" +---*/ + +//CHECK#1 +{a:1 +} 3 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T11.js b/js/src/tests/test262/language/asi/S7.9_A10_T11.js new file mode 100644 index 0000000000..351b323d06 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T11.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T11 +description: "Checking if execution of \"{a:1 \\n} \\n 3\" passes" +---*/ + +//CHECK#1 +{a:1 +} +3 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T12.js b/js/src/tests/test262/language/asi/S7.9_A10_T12.js new file mode 100644 index 0000000000..a56760c3d1 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T12.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: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T12 +description: "Checking if execution of \"{ \\n a: \\n 1 \\n } \\n 3\" passes" +---*/ + +//CHECK#1 +{ +a: +1 +} +3 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T2.js b/js/src/tests/test262/language/asi/S7.9_A10_T2.js new file mode 100644 index 0000000000..211ce446af --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T2.js @@ -0,0 +1,17 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T2 +description: Checking if execution of "{}*1" fails +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +{} * 1 diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T3.js b/js/src/tests/test262/language/asi/S7.9_A10_T3.js new file mode 100644 index 0000000000..cf37eb2f65 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T3.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T3 +description: Checking if execution of "({}) * 1" passes +---*/ + +//CHECK#1 +({}) * 1 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T4.js b/js/src/tests/test262/language/asi/S7.9_A10_T4.js new file mode 100644 index 0000000000..b4e29d1368 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T4.js @@ -0,0 +1,17 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T4 +description: Checking if execution of "({};)*1" fails +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +({};) * 1 diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T5.js b/js/src/tests/test262/language/asi/S7.9_A10_T5.js new file mode 100644 index 0000000000..c8b47f901e --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T5.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T5 +description: Checking if execution of "( \n {} \n ) * 1" passes +---*/ + +//CHECK#1 +( + {} +) * 1 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T6.js b/js/src/tests/test262/language/asi/S7.9_A10_T6.js new file mode 100644 index 0000000000..569b3f9319 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T6.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T6 +description: Checking if execution of "{} \n * 1" fails +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +{} + * 1 diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T7.js b/js/src/tests/test262/language/asi/S7.9_A10_T7.js new file mode 100644 index 0000000000..8f9ca5f9db --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T7.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T7 +description: Checking if execution of "{1} 2" passes +---*/ + +//CHECK#1 +{1} 2 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T8.js b/js/src/tests/test262/language/asi/S7.9_A10_T8.js new file mode 100644 index 0000000000..6bb950ed3c --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T8.js @@ -0,0 +1,17 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T8 +description: Checking if execution of "{1 2} 3" fails +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +{1 2} 3 diff --git a/js/src/tests/test262/language/asi/S7.9_A10_T9.js b/js/src/tests/test262/language/asi/S7.9_A10_T9.js new file mode 100644 index 0000000000..cfb712b099 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A10_T9.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: Check {} for automatic semicolon insertion +es5id: 7.9_A10_T9 +description: Checking if execution of "{1 \n 2} 3" passes +---*/ + +//CHECK#1 +{1 +2} 3 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T1.js b/js/src/tests/test262/language/asi/S7.9_A11_T1.js new file mode 100644 index 0000000000..fe26545495 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T1.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: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T1 +description: Use if (false) x = 1 (without semicolon) and check x +---*/ + +//CHECK#1 +var x = 0; +if (false) x = 1 +if (x !== 0) { + $ERROR('#1: Check If Statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T10.js b/js/src/tests/test262/language/asi/S7.9_A11_T10.js new file mode 100644 index 0000000000..40ab8e439d --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T10.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: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T10 +description: Use if (false) {x = 1} else {x=-1} and check x +---*/ + +//CHECK#1 +var x = 0; +if (false) {x = 1} else {x = -1} +if (x !== -1) { + $ERROR('#1: Check If Statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T11.js b/js/src/tests/test262/language/asi/S7.9_A11_T11.js new file mode 100644 index 0000000000..6f50397984 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T11.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T11 +description: Use if (false) {{x = 1};} \n else x=-1 and check x +---*/ + +//CHECK#1 +var x = 0; +if (false) {{x = 1};} +else x = -1 +if (x !== -1) { + $ERROR('#1: Check If Statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T2.js b/js/src/tests/test262/language/asi/S7.9_A11_T2.js new file mode 100644 index 0000000000..4af3f3302c --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T2.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T2 +description: Use if (false) \n x = 1 and check x +---*/ + +//CHECK#1 +var x = 0; +if (false) +x = 1 +if (x !== 0) { + $ERROR('#1: Check If Statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T3.js b/js/src/tests/test262/language/asi/S7.9_A11_T3.js new file mode 100644 index 0000000000..cd50b09307 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T3.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T3 +description: Use if (false);\n x = 1 and check x +---*/ + +//CHECK#1 +var x = 0; +if (false); +x = 1 +if (x !== 1) { + $ERROR('#1: Check If Statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T4.js b/js/src/tests/test262/language/asi/S7.9_A11_T4.js new file mode 100644 index 0000000000..1054869122 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T4.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T4 +description: Checking if execution of "if (false) x = 1 else x = -1" fails +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +var x = 0; +if (false) x = 1 else x = -1 diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T5.js b/js/src/tests/test262/language/asi/S7.9_A11_T5.js new file mode 100644 index 0000000000..7a1a08a13b --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T5.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: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T5 +description: Use if (false) x = 1; else x=-1 and check x +---*/ + +//CHECK#1 +var x = 0; +if (false) x = 1; else x = -1 +if (x !== -1) { + $ERROR('#1: Check If Statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T6.js b/js/src/tests/test262/language/asi/S7.9_A11_T6.js new file mode 100644 index 0000000000..a229bbda64 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T6.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T6 +description: Use if (false) x = 1 \n else x=-1 and check x +---*/ + +//CHECK#1 +var x = 0; +if (false) x = 1 +else x = -1 +if (x !== -1) { + $ERROR('#1: Check If Statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T7.js b/js/src/tests/test262/language/asi/S7.9_A11_T7.js new file mode 100644 index 0000000000..53af8099e1 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T7.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T7 +description: Use if (false) x = 1; \n else x=-1 and check x +---*/ + +//CHECK#1 +var x = 0; +if (false) x = 1; +else x = -1 +if (x !== -1) { + $ERROR('#1: Check If Statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T8.js b/js/src/tests/test262/language/asi/S7.9_A11_T8.js new file mode 100644 index 0000000000..2620c8393c --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T8.js @@ -0,0 +1,17 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T8 +description: Use if (false) {x = 1}; \n else x=-1 and check x +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +if (false) {}; +else {} diff --git a/js/src/tests/test262/language/asi/S7.9_A11_T9.js b/js/src/tests/test262/language/asi/S7.9_A11_T9.js new file mode 100644 index 0000000000..4ed248f71a --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A11_T9.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check If Statement for automatic semicolon insertion +es5id: 7.9_A11_T9 +description: Use if (false) {x = 1} \n else x=-1 and check x +---*/ + +//CHECK#1 +var x = 0; +if (false) {x = 1} +else x = -1 +if (x !== -1) { + $ERROR('#1: Check If Statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A2.js b/js/src/tests/test262/language/asi/S7.9_A2.js new file mode 100644 index 0000000000..24b42b3ee3 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A2.js @@ -0,0 +1,32 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Break Statement for automatic semicolon insertion +es5id: 7.9_A2 +description: Try use break \n Label construction +---*/ + +//CHECK#1 +label1: for (var i = 0; i <= 0; i++) { + for (var j = 0; j <= 0; j++) { + break label1; + } + $ERROR('#1: Check break statement for automatic semicolon insertion'); +} + +//CHECK#2 +var result = false; +label2: for (var i = 0; i <= 0; i++) { + for (var j = 0; j <= 0; j++) { + break + label2; + } + result = true; +} + +if (result !== true) { + $ERROR('#2: Check break statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A3.js b/js/src/tests/test262/language/asi/S7.9_A3.js new file mode 100644 index 0000000000..1231ac9d7b --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A3.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Return Statement for automatic semicolon insertion +es5id: 7.9_A3 +description: Try use return \n Expression construction +---*/ + +//CHECK#1 +function f1() +{ + return 1; +} +if (f1() !== 1) { + $ERROR('#1: Check return statement for automatic semicolon insertion'); +} + +//CHECK#2 +function f2() +{ + return + 1; +} +if (f2() !== undefined) { + $ERROR('#2: Check return statement for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A4.js b/js/src/tests/test262/language/asi/S7.9_A4.js new file mode 100644 index 0000000000..fd5902a4e3 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A4.js @@ -0,0 +1,21 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Throw Statement for automatic semicolon insertion +es5id: 7.9_A4 +description: Try use Throw \n Expression construction +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +try { + throw + 1; +} catch(e) { +} diff --git a/js/src/tests/test262/language/asi/S7.9_A5.1_T1.js b/js/src/tests/test262/language/asi/S7.9_A5.1_T1.js new file mode 100644 index 0000000000..c8792fc3d6 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.1_T1.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Postfix Increment Operator for automatic semicolon insertion +es5id: 7.9_A5.1_T1 +description: Try use Variable \n ++ construction +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +var x = 0; +x +++; diff --git a/js/src/tests/test262/language/asi/S7.9_A5.2_T1.js b/js/src/tests/test262/language/asi/S7.9_A5.2_T1.js new file mode 100644 index 0000000000..12e071c04d --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.2_T1.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Prefix Increment Operator for automatic semicolon insertion +es5id: 7.9_A5.2_T1 +description: Try use Variable1 \n ++Variable2 construction +---*/ + +//CHECK#1 +var x = 0; +var y = 0; +x +++y +if (x !== 0) { + $ERROR('#1: Check Prefix Increment Operator for automatic semicolon insertion'); +} else { + if (y !== 1) { + $ERROR('#2: Check Prefix Increment Operator for automatic semicolon insertion'); + } +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.3_T1.js b/js/src/tests/test262/language/asi/S7.9_A5.3_T1.js new file mode 100644 index 0000000000..1ebc753be2 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.3_T1.js @@ -0,0 +1,19 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Postfix Decrement Operator for automatic semicolon insertion +es5id: 7.9_A5.3_T1 +description: Try use Variable \n -- construction +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +var x = 1; +x +--; diff --git a/js/src/tests/test262/language/asi/S7.9_A5.4_T1.js b/js/src/tests/test262/language/asi/S7.9_A5.4_T1.js new file mode 100644 index 0000000000..5c65d79747 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.4_T1.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Prefix Decrement Operator for automatic semicolon insertion +es5id: 7.9_A5.4_T1 +description: Try use Variable1 \n --Variable2 construction +---*/ + +//CHECK#1 +var x = 1; +var y = 1; +x +--y +if (x !== 1) { + $ERROR('#1: Check Prefix Decrement Operator for automatic semicolon insertion'); +} else { + if (y !== 0) { + $ERROR('#1: Check Prefix Decrement Operator for automatic semicolon insertion'); + } +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.5_T1.js b/js/src/tests/test262/language/asi/S7.9_A5.5_T1.js new file mode 100644 index 0000000000..c1b03c3e77 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.5_T1.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T1 +description: Try use 1 + function_name\n(2 + 3) construction +---*/ + +//CHECK#1 +function f(t) { + return t; +} +var x = 1 + f +(2 + 3) +if (x !== 6) { + $ERROR('#1: Check Function Expression for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.5_T2.js b/js/src/tests/test262/language/asi/S7.9_A5.5_T2.js new file mode 100644 index 0000000000..09d3e78f90 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.5_T2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T2 +description: > + Try use function f(o) {o.x = 1; return o;}; \n (new Object()).x; + construction +---*/ + +//CHECK#1 +var result = function f(o) {o.x = 1; return o;}; +(new Object()).x; +if (typeof result !== "function") { + $ERROR('#1: Check Function Expression for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.5_T3.js b/js/src/tests/test262/language/asi/S7.9_A5.5_T3.js new file mode 100644 index 0000000000..ab3d30533f --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.5_T3.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T3 +description: > + Try use function f(o) {o.x = 1; return o;} \n (new Object()).x; + construction +---*/ + +//CHECK#1 +var result = function f(o) {o.x = 1; return o;} +(new Object()).x; +if (result !== 1) { + $ERROR('#1: Check Function Expression for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.5_T4.js b/js/src/tests/test262/language/asi/S7.9_A5.5_T4.js new file mode 100644 index 0000000000..a73caed52f --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.5_T4.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T4 +description: Insert some LineTerminators into function body +---*/ + +//CHECK#1 +var x = +1 + (function (t){return {a:t +} +}) +(2 + 3). +a + +if (x !== 6) { + $ERROR('#1: Check Function Expression for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.5_T5.js b/js/src/tests/test262/language/asi/S7.9_A5.5_T5.js new file mode 100644 index 0000000000..5183e0ce59 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.5_T5.js @@ -0,0 +1,30 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Function Expression for automatic semicolon insertion +es5id: 7.9_A5.5_T5 +description: Insert some LineTerminators into rerutn expression; +---*/ + +//CHECK#1 +var x = +1 + (function f +(t){ +return { +a: +function(){ +return t + 1 +} +} +} +) +(2 + 3). +a +() + +if (x !== 7) { + $ERROR('#1: Check Function Expression for automatic semicolon insertion'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.6_T1.js b/js/src/tests/test262/language/asi/S7.9_A5.6_T1.js new file mode 100644 index 0000000000..eba9b870c6 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.6_T1.js @@ -0,0 +1,37 @@ +// 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 Postfix Increment/Decrement Operator(I/DO) and operand is not allowed but + between Prefix I/DO and operand admitted, Postfix I/DO in combination with prefix I/DO after automatic semicolon insertion gives valid result +es5id: 7.9_A5.6_T1 +description: Try use Variable1 \n ++ \n Variable2 construction +---*/ + +var x=0, y=0; + +x +++ +y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if ((x!==0)&(y!==1)) { + $ERROR('#1: Check Postfix Increment Operator for automatic semicolon insertion'); +} +// +////////////////////////////////////////////////////////////////////////////// + +x +++y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if ((x!==0)&(y!==2)) { + $ERROR('#2: Check Postfix Increment Operator for automatic semicolon insertion'); +} +// +////////////////////////////////////////////////////////////////////////////// + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.6_T2.js b/js/src/tests/test262/language/asi/S7.9_A5.6_T2.js new file mode 100644 index 0000000000..0f66b0ab2b --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.6_T2.js @@ -0,0 +1,37 @@ +// 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 Postfix Increment/Decrement Operator(I/DO) and operand is not allowed but + between Prefix I/DO and operand admitted, Postfix I/DO in combination with prefix I/DO after automatic semicolon insertion gives valid result +es5id: 7.9_A5.6_T2 +description: Try use Variable1 \n -- \n Variable2 construction +---*/ + +var x=0, y=2; + +x +-- +y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if ((x!==0)&(y!==1)) { + $ERROR('#1: Check Postfix Increment Operator for automatic semicolon insertion'); +} +// +////////////////////////////////////////////////////////////////////////////// + +x +--y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if ((x!==0)&(y!==0)) { + $ERROR('#2: Check Postfix Increment Operator for automatic semicolon insertion'); +} +// +////////////////////////////////////////////////////////////////////////////// + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.7_T1.js b/js/src/tests/test262/language/asi/S7.9_A5.7_T1.js new file mode 100644 index 0000000000..7e8dde61f7 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.7_T1.js @@ -0,0 +1,26 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Since LineTerminator(LT) between Postfix Increment/Decrement + Operator(I/DO) and operand is not allowed, two IO(just as two DO + and their combination) between two references separated by [LT] + after automatic semicolon insertion lead to syntax error + +es5id: 7.9_A5.7_T1 +description: Try use Variable1 \n ++ \n ++ \n Variable2 construction +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +var x=0, y=0; +var z= +x +++ +++ +y diff --git a/js/src/tests/test262/language/asi/S7.9_A5.8_T1.js b/js/src/tests/test262/language/asi/S7.9_A5.8_T1.js new file mode 100644 index 0000000000..f6f9863d8a --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.8_T1.js @@ -0,0 +1,53 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Since LineTerminator(LT) between Postfix Increment/Decrement Operator(I/DO) and operand is admitted, + Additive/Substract Operator(A/SO) in combination with I/DO separated by LT or white spaces after automatic semicolon insertion gives valid result +es5id: 7.9_A5.8_T1 +description: Try use Variable1 \n + \n ++ \n Variable2 construction +---*/ + +var x=0, y=0; +var z= +x ++ +++ +y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if ((z!==1)&&(y!==1)&&(x!==0)) { + $ERROR('#1: '); +} +// +////////////////////////////////////////////////////////////////////////////// + +z= +x ++ ++ +y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if ((z!==2)&&(y!==2)&&(x!==0)) { + $ERROR(''); +} +// +////////////////////////////////////////////////////////////////////////////// + +z= +x ++ ++ +y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#3 +if ((z!==3)&&(y!==3)&&(x!==0)) { + $ERROR(''); +} +// +////////////////////////////////////////////////////////////////////////////// + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A5.9_T1.js b/js/src/tests/test262/language/asi/S7.9_A5.9_T1.js new file mode 100644 index 0000000000..cd61a056c8 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A5.9_T1.js @@ -0,0 +1,55 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Additive/Substract Operator(A/SO) in combination with itself separated by LT or white spaces + after automatic semicolon insertion gives valid result +es5id: 7.9_A5.9_T1 +description: > + Try use Variable1 (different combinations of three +) Variable2 + construction +---*/ + +var x=1, y=1; +var z= +x ++ ++ ++ +y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#1 +if ((z!==2)&&(y!==1)&&(x!==1)) { + $ERROR('#1: '); +} +// +////////////////////////////////////////////////////////////////////////////// + +z= +x + + + y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#2 +if ((z!==2)&&(y!==1)&&(x!==1)) { + $ERROR(''); +} +// +////////////////////////////////////////////////////////////////////////////// + +z= +x ++ + ++ + +y + +////////////////////////////////////////////////////////////////////////////// +//CHECK#3 +if ((z!==2)&&(y!==1)&&(x!==1)) { + $ERROR(''); +} +// +////////////////////////////////////////////////////////////////////////////// + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T1.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T1.js new file mode 100644 index 0000000000..02ab62dd61 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T1.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: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T1 +description: for( Empty two semicolons and \n) +---*/ + +//CHECK#1 +for(;; +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T10.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T10.js new file mode 100644 index 0000000000..7d9dce9ee6 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T10.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: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T10 +description: for (false \n two semicolons false \n) +---*/ + +//CHECK#1 +for(false + ;;false +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T11.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T11.js new file mode 100644 index 0000000000..1f94ea84d0 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T11.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T11 +description: for (false \n semicolon \n semicolon \n) +---*/ + +//CHECK#1 +for(false + ; + ; +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T12.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T12.js new file mode 100644 index 0000000000..7851aed4e3 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T12.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T12 +description: for (false \n semicolon false \n semicolon \n) +---*/ + +//CHECK#1 +for(false + ;false + ; +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T13.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T13.js new file mode 100644 index 0000000000..76634835bf --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T13.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T13 +description: for (false \n semicolon false \n semicolon false \n) +---*/ + +//CHECK#1 +for(false + ;false + ;false +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T2.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T2.js new file mode 100644 index 0000000000..f17bd11ed8 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T2.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: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T2 +description: for (semicolon \n semicolon \n) +---*/ + +//CHECK#1 +for(; + ; +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T3.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T3.js new file mode 100644 index 0000000000..965a73387d --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T3.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: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T3 +description: for (\n two semicolons \n) +---*/ + +//CHECK#1 +for( + ;; +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T4.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T4.js new file mode 100644 index 0000000000..9a5a594718 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T4.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T4 +description: for( \n semicolon \n semicolon \n) +---*/ + +//CHECK#1 +for( + ; + ; +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T5.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T5.js new file mode 100644 index 0000000000..83fb0d8dce --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T5.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T5 +description: for ( \n semicolon \n\n semicolon \n) +---*/ + +//CHECK#1 +for( + ; + + ; +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T6.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T6.js new file mode 100644 index 0000000000..5b282c0f9f --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T6.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: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T6 +description: for(false semicolon false semicolon false \n) +---*/ + +//CHECK#1 +for(false;false;false +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T7.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T7.js new file mode 100644 index 0000000000..af19a1a660 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T7.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: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T7 +description: for (false semicolon false \n semicolon \n) +---*/ + +//CHECK#1 +for(false;false + ; +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T8.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T8.js new file mode 100644 index 0000000000..edb4adf6e6 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T8.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: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T8 +description: for (false semicolon false \n semicolon false \n) +---*/ + +//CHECK#1 +for(false;false + ;false +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.1_T9.js b/js/src/tests/test262/language/asi/S7.9_A6.1_T9.js new file mode 100644 index 0000000000..0c495ea2b6 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.1_T9.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: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.1_T9 +description: for (false \n two semicolons \n) +---*/ + +//CHECK#1 +for(false + ;; +) { + break; +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T1.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T1.js new file mode 100644 index 0000000000..8ea9858bcd --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T1.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T1 +description: For header is (semicolon \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for(; +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T10.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T10.js new file mode 100644 index 0000000000..68e69f5967 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T10.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T10 +description: For header is (\n false \n semicolon) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( + false +;) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T2.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T2.js new file mode 100644 index 0000000000..e375fad3f7 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T2.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T2 +description: For header is (\n semicolon \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( + ; +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T3.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T3.js new file mode 100644 index 0000000000..74a5eb3e02 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T3.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T3 +description: For header is (\n semicolon) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( +;) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T4.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T4.js new file mode 100644 index 0000000000..e94a645d74 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T4.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T4 +description: For header is (\n \n semicolon) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( + +;) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T5.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T5.js new file mode 100644 index 0000000000..1f7aac39fd --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T5.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T5 +description: For header is (false semicolon false\n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for(false;false +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T6.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T6.js new file mode 100644 index 0000000000..20b4a047b7 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T6.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T6 +description: For header is (false semicolon \n false) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for(false; +false +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T7.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T7.js new file mode 100644 index 0000000000..4fc8e8bdb9 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T7.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T7 +description: For header is (false \n semicolon \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for(false + ; +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T8.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T8.js new file mode 100644 index 0000000000..2ebed7663c --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T8.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T8 +description: For header is (false \n semicolon false \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for(false + ;false +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.2_T9.js b/js/src/tests/test262/language/asi/S7.9_A6.2_T9.js new file mode 100644 index 0000000000..fd48c7e3fd --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.2_T9.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Use one semicolon +es5id: 7.9_A6.2_T9 +description: For header is (\n semicolon false) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( +;false) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.3_T1.js b/js/src/tests/test262/language/asi/S7.9_A6.3_T1.js new file mode 100644 index 0000000000..2b314b474b --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.3_T1.js @@ -0,0 +1,23 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T1 +description: For header is (\n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.3_T2.js b/js/src/tests/test262/language/asi/S7.9_A6.3_T2.js new file mode 100644 index 0000000000..633532cc9a --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.3_T2.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T2 +description: For header is (\n \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( + +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.3_T3.js b/js/src/tests/test262/language/asi/S7.9_A6.3_T3.js new file mode 100644 index 0000000000..4301df0a26 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.3_T3.js @@ -0,0 +1,25 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T3 +description: For header is (\n \n \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( + + +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.3_T4.js b/js/src/tests/test262/language/asi/S7.9_A6.3_T4.js new file mode 100644 index 0000000000..8b15462ea3 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.3_T4.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T4 +description: For header is (\n false \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( + false +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.3_T5.js b/js/src/tests/test262/language/asi/S7.9_A6.3_T5.js new file mode 100644 index 0000000000..364aef6fd3 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.3_T5.js @@ -0,0 +1,24 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T5 +description: For header is (false \n false \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for(false + false +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.3_T6.js b/js/src/tests/test262/language/asi/S7.9_A6.3_T6.js new file mode 100644 index 0000000000..82d4be0e7f --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.3_T6.js @@ -0,0 +1,25 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T6 +description: For header is (\n false \n false \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( + false + false +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.3_T7.js b/js/src/tests/test262/language/asi/S7.9_A6.3_T7.js new file mode 100644 index 0000000000..50fdc523f6 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.3_T7.js @@ -0,0 +1,26 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: | + Check For Statement for automatic semicolon insertion. + If automatic insertion semicolon would become one of the two semicolons in the header of a For Statement. + Don`t use semicolons +es5id: 7.9_A6.3_T7 +description: For header is (\n false \n false \n false \n) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for( + false + false + false +) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.4_T1.js b/js/src/tests/test262/language/asi/S7.9_A6.4_T1.js new file mode 100644 index 0000000000..98e02d6502 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.4_T1.js @@ -0,0 +1,21 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.4_T1 +description: > + Three semicolons. For header is (false semicolon false semicolon + false semicolon) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for(false;false;false;) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A6.4_T2.js b/js/src/tests/test262/language/asi/S7.9_A6.4_T2.js new file mode 100644 index 0000000000..41ce65c042 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A6.4_T2.js @@ -0,0 +1,21 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check For Statement for automatic semicolon insertion +es5id: 7.9_A6.4_T2 +description: > + Three semicolons. For header is (false semicolon false two + semicolons false) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +for(false;false;;false) { + break; +} diff --git a/js/src/tests/test262/language/asi/S7.9_A7_T1.js b/js/src/tests/test262/language/asi/S7.9_A7_T1.js new file mode 100644 index 0000000000..6cb7e756d1 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A7_T1.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: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T1 +description: Checking if execution of "var x \n = 1" passes +---*/ + +//CHECK#1 +var x += 1 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A7_T2.js b/js/src/tests/test262/language/asi/S7.9_A7_T2.js new file mode 100644 index 0000000000..47f1d16d3d --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A7_T2.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: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T2 +description: Checking if execution of "var x = \n 1" passes +---*/ + +//CHECK#1 +var x = +1 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A7_T3.js b/js/src/tests/test262/language/asi/S7.9_A7_T3.js new file mode 100644 index 0000000000..c5911bde72 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A7_T3.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: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T3 +description: Checking if execution of "var x \n x = 1" passes +---*/ + +//CHECK#1 +var x +x = 1 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A7_T4.js b/js/src/tests/test262/language/asi/S7.9_A7_T4.js new file mode 100644 index 0000000000..bdadee7394 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A7_T4.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: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T4 +description: Checking if execution of "var \n x" passes +---*/ + +//CHECK#1 +var +x + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A7_T5.js b/js/src/tests/test262/language/asi/S7.9_A7_T5.js new file mode 100644 index 0000000000..912d844cde --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A7_T5.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: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T5 +description: Checking if execution of "var \n x \n = \n 1" passes +---*/ + +//CHECK#1 +var +x += +1 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A7_T6.js b/js/src/tests/test262/language/asi/S7.9_A7_T6.js new file mode 100644 index 0000000000..9e098c19cf --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A7_T6.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: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T6 +description: Checking if execution of "var x, \n y" passes +---*/ + +//CHECK#1 +var x, +y + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A7_T7.js b/js/src/tests/test262/language/asi/S7.9_A7_T7.js new file mode 100644 index 0000000000..5f5bfea571 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A7_T7.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T7 +description: Checking if execution of "var x \n y" passes +---*/ + +assert.throws(ReferenceError, function() { +var x +y +}); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A7_T8.js b/js/src/tests/test262/language/asi/S7.9_A7_T8.js new file mode 100644 index 0000000000..ce8b00baff --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A7_T8.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: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T8 +description: Checking if execution of "var x \n ,y" passes +---*/ + +//CHECK#1 +var x +,y + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A7_T9.js b/js/src/tests/test262/language/asi/S7.9_A7_T9.js new file mode 100644 index 0000000000..82fb3683b8 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A7_T9.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Var Statement for automatic semicolon insertion +es5id: 7.9_A7_T9 +description: Checking if execution of "var x \n ,y = 1" passes +---*/ + +//CHECK#1 +var +x +,y = 1 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A8_T1.js b/js/src/tests/test262/language/asi/S7.9_A8_T1.js new file mode 100644 index 0000000000..acfd579a1c --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A8_T1.js @@ -0,0 +1,13 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T1 +description: Checking if execution of one semicolon passes +---*/ + +//CHECK#1 +; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A8_T2.js b/js/src/tests/test262/language/asi/S7.9_A8_T2.js new file mode 100644 index 0000000000..fae7a60fe8 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A8_T2.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: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T2 +description: Checking if execution of some semicolons with LineTerminators pases +---*/ + +//CHECK#1 +; +; +; +; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A8_T3.js b/js/src/tests/test262/language/asi/S7.9_A8_T3.js new file mode 100644 index 0000000000..52d44f136c --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A8_T3.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T3 +description: > + Checking if execution of some semicolons without LineTerminators + passes +---*/ + +//CHECK#1 +;;;; + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A8_T4.js b/js/src/tests/test262/language/asi/S7.9_A8_T4.js new file mode 100644 index 0000000000..e87d480eab --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A8_T4.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T4 +description: > + Checking if execution of some semicolons with LineTerminators and + numbers passes +---*/ + +//CHECK#1 +;1; +;1 +;1; +;1 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A8_T5.js b/js/src/tests/test262/language/asi/S7.9_A8_T5.js new file mode 100644 index 0000000000..02e7dd8ac1 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A8_T5.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Empty Statement for automatic semicolon insertion +es5id: 7.9_A8_T5 +description: > + Checking if execution of some semicolons without LineTerminators + but with numbers passes +---*/ + +//CHECK#1 +;;1;;1;;1 + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A9_T1.js b/js/src/tests/test262/language/asi/S7.9_A9_T1.js new file mode 100644 index 0000000000..6a61a83b1b --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A9_T1.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: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T1 +description: Execute do { \n }while(false) +---*/ + +//CHECK#1 +do { +} while (false) + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A9_T2.js b/js/src/tests/test262/language/asi/S7.9_A9_T2.js new file mode 100644 index 0000000000..2b3804671b --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A9_T2.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: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T2 +description: Execute do; while(false) \n true +---*/ + +//CHECK#1 +do ; while (false) +true + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A9_T5.js b/js/src/tests/test262/language/asi/S7.9_A9_T5.js new file mode 100644 index 0000000000..9535b51010 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A9_T5.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: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T5 +description: Execute do { \n ; \n }while((false) \n ) +---*/ + +//CHECK#1 +do { + ; +} while ((false) +) + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/S7.9_A9_T6.js b/js/src/tests/test262/language/asi/S7.9_A9_T6.js new file mode 100644 index 0000000000..25b861fd3e --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A9_T6.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T6 +description: Execute do \n while(false) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +do +while (false) diff --git a/js/src/tests/test262/language/asi/S7.9_A9_T7.js b/js/src/tests/test262/language/asi/S7.9_A9_T7.js new file mode 100644 index 0000000000..414971cc75 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A9_T7.js @@ -0,0 +1,19 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T7 +description: Execute do \n\n while(false) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +do + +while (false) diff --git a/js/src/tests/test262/language/asi/S7.9_A9_T8.js b/js/src/tests/test262/language/asi/S7.9_A9_T8.js new file mode 100644 index 0000000000..143fb47235 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A9_T8.js @@ -0,0 +1,18 @@ +// |reftest| error:SyntaxError +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T8 +description: Execute do {}; \n while(false) +negative: + phase: parse + type: SyntaxError +---*/ + +$DONOTEVALUATE(); + +//CHECK#1 +do {}; +while (false) diff --git a/js/src/tests/test262/language/asi/S7.9_A9_T9.js b/js/src/tests/test262/language/asi/S7.9_A9_T9.js new file mode 100644 index 0000000000..ed7a24c1c7 --- /dev/null +++ b/js/src/tests/test262/language/asi/S7.9_A9_T9.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: Check Do-While Statement for automatic semicolon insertion +es5id: 7.9_A9_T9 +description: Execute do {} \n while(false) +---*/ + +//CHECK#1 +do {} +while (false) + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/browser.js b/js/src/tests/test262/language/asi/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/language/asi/browser.js diff --git a/js/src/tests/test262/language/asi/do-while-same-line.js b/js/src/tests/test262/language/asi/do-while-same-line.js new file mode 100644 index 0000000000..9c6c85d654 --- /dev/null +++ b/js/src/tests/test262/language/asi/do-while-same-line.js @@ -0,0 +1,26 @@ +// Copyright (C) 2019 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-rules-of-automatic-semicolon-insertion +description: ASI at the end of a do-while statement without a new line terminator +info: | + 1. When, as the source text is parsed from left to right, a token (called the offending token) is + encountered that is not allowed by any production of the grammar, then a semicolon is + automatically inserted before the offending token if one or more of the following conditions is + true: + + ... + - The previous token is ) and the inserted semicolon would then be parsed as the terminating + semicolon of a do-while statement (13.7.2). +---*/ + +var x; +do break ; while (0) x = 42; +assert.sameValue(x, 42); + +x = 0; +do do do ; while (x) while (x) while (x) x = 39; +assert.sameValue(x, 39); + +reportCompare(0, 0); diff --git a/js/src/tests/test262/language/asi/shell.js b/js/src/tests/test262/language/asi/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/language/asi/shell.js |