diff --git a/test/language/line-terminators/S7.3_A3.1_T1.js b/test/language/line-terminators/S7.3_A3.1_T1.js deleted file mode 100644 index 45ca9558f53a9f6b3b50d9359557e0cde3fa4285..0000000000000000000000000000000000000000 --- a/test/language/line-terminators/S7.3_A3.1_T1.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Single line comments are terminated by the LINE FEED (U+000A) character -es5id: 7.3_A3.1_T1 -description: Insert LINE FEED (\u000A) into single line comment ----*/ - -assert.throws(Test262Error, function() { - eval("// single line \u000A throw new Test262Error();"); -}); diff --git a/test/language/line-terminators/S7.3_A4_T2.js b/test/language/line-terminators/S7.3_A4_T2.js deleted file mode 100644 index fc1d805d23d5c38f5671f396941cb24d8b4c5875..0000000000000000000000000000000000000000 --- a/test/language/line-terminators/S7.3_A4_T2.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Single line comments can contain Line Terminator at the end of line -es5id: 7.3_A4_T2 -description: Insert CARRIAGE RETURN (U+000D) into the end of single line comment ----*/ - -// CHECK#1 -eval("// single line comment\u000D"); - -// CHECK#2 -var x = 0; -eval("// single line comment\u000D x = 1;"); -if (x !== 1) { - $ERROR('#1: var x = 0; eval("// single line comment\\u000D x = 1;"); x === 1. Actual: ' + (x)); -} diff --git a/test/language/line-terminators/S7.3_A4_T3.js b/test/language/line-terminators/S7.3_A4_T3.js deleted file mode 100644 index 57b182938c9a20fba6e15057dd9d1695e7fded3e..0000000000000000000000000000000000000000 --- a/test/language/line-terminators/S7.3_A4_T3.js +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Single line comments can contain Line Terminator at the end of line -es5id: 7.3_A4_T3 -description: Insert LINE SEPARATOR (U+2028) into the end of single line comment ----*/ - -// CHECK#1 -eval("// single line comment\u2028"); - -// CHECK#2 -var x = 0; -eval("// single line comment\u2028 x = 1;"); -if (x !== 1) { - $ERROR('#1: var x = 0; eval("// single line comment\\u2028 x = 1;"); x === 1. Actual: ' + (x)); -} diff --git a/test/language/line-terminators/S7.3_A4_T4.js b/test/language/line-terminators/S7.3_A4_T4.js deleted file mode 100644 index 9ebd1a42923f434d37bc822b06dcbc331cb57c7d..0000000000000000000000000000000000000000 --- a/test/language/line-terminators/S7.3_A4_T4.js +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Single line comments can contain Line Terminator at the end of line -es5id: 7.3_A4_T4 -description: > - Insert PARAGRAPH SEPARATOR (U+2029) into the end of single line - comment ----*/ - -// CHECK#1 -eval("// single line comment\u2029"); - -// CHECK#2 -var x = 0; -eval("// single line comment\u2029 x = 1;"); -if (x !== 1) { - $ERROR('#1: var x = 0; eval("// single line comment\\u2029 x = 1;"); x === 1. Actual: ' + (x)); -} diff --git a/test/language/line-terminators/comment-single-cr.js b/test/language/line-terminators/comment-single-cr.js new file mode 100644 index 0000000000000000000000000000000000000000..932ab27b4b74be38cc1db5b3c5e68aa92ddaa347 --- /dev/null +++ b/test/language/line-terminators/comment-single-cr.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: Single line comments can contain Line Terminator at the end of line +esid: sec-line-terminators +es5id: 7.3_A4_T2 +description: Insert CARRIAGE RETURN (U+000D) into the end of single line comment +negative: + phase: runtime + type: Test262Error +---*/ + +// Because this test concerns the interpretation of non-executable character +// sequences within ECMAScript source code, special care must be taken to +// ensure that executable code is evaluated as expected. +// +// Express the intended behavior by intentionally throwing an error; this +// guarantees that test runners will only consider the test "passing" if +// executable sequences are correctly interpreted as such. + +// single line throw new Test262Error(); diff --git a/test/language/line-terminators/comment-single-lf.js b/test/language/line-terminators/comment-single-lf.js new file mode 100644 index 0000000000000000000000000000000000000000..0467a5992087c4532268528592771228abd18c24 --- /dev/null +++ b/test/language/line-terminators/comment-single-lf.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: Single line comments are terminated by the LINE FEED (U+000A) character +esid: sec-line-terminators +es5id: 7.3_A3.1_T1 +description: Insert LINE FEED (\u000A) into single line comment +negative: + phase: runtime + type: Test262Error +---*/ + +// Because this test concerns the interpretation of non-executable character +// sequences within ECMAScript source code, special care must be taken to +// ensure that executable code is evaluated as expected. +// +// Express the intended behavior by intentionally throwing an error; this +// guarantees that test runners will only consider the test "passing" if +// executable sequences are correctly interpreted as such. + +// single line +throw new Test262Error(); diff --git a/test/language/line-terminators/comment-single-ls.js b/test/language/line-terminators/comment-single-ls.js new file mode 100644 index 0000000000000000000000000000000000000000..e47731a09b9c91878c3bdbeb72c9b0155e717a7d --- /dev/null +++ b/test/language/line-terminators/comment-single-ls.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: Single line comments can contain Line Terminator at the end of line +esid: sec-line-terminators +es5id: 7.3_A4_T3 +description: Insert LINE SEPARATOR (U+2028) into the end of single line comment +negative: + phase: runtime + type: Test262Error +---*/ + +// Because this test concerns the interpretation of non-executable character +// sequences within ECMAScript source code, special care must be taken to +// ensure that executable code is evaluated as expected. +// +// Express the intended behavior by intentionally throwing an error; this +// guarantees that test runners will only consider the test "passing" if +// executable sequences are correctly interpreted as such. + +// single line
throw new Test262Error(); diff --git a/test/language/line-terminators/comment-single-ps.js b/test/language/line-terminators/comment-single-ps.js new file mode 100644 index 0000000000000000000000000000000000000000..95e6ec02e39bd624fff15c02314cd127ee0b28e2 --- /dev/null +++ b/test/language/line-terminators/comment-single-ps.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: Single line comments can contain Line Terminator at the end of line +esid: sec-line-terminators +es5id: 7.3_A4_T4 +description: > + Insert PARAGRAPH SEPARATOR (U+2029) into the end of single line + comment +negative: + phase: runtime + type: Test262Error +---*/ + +// Because this test concerns the interpretation of non-executable character +// sequences within ECMAScript source code, special care must be taken to +// ensure that executable code is evaluated as expected. +// +// Express the intended behavior by intentionally throwing an error; this +// guarantees that test runners will only consider the test "passing" if +// executable sequences are correctly interpreted as such. + +// single line
throw new Test262Error(); diff --git a/test/language/line-terminators/S7.3_A3.2_T2.js b/test/language/line-terminators/invalid-comment-single-cr.js similarity index 65% rename from test/language/line-terminators/S7.3_A3.2_T2.js rename to test/language/line-terminators/invalid-comment-single-cr.js index 580e558a1b9cd1cce9efa2ac462a7554ecaa5250..09568f1a648cbf76473a4e8c973a49f7dbbaca5f 100644 --- a/test/language/line-terminators/S7.3_A3.2_T2.js +++ b/test/language/line-terminators/invalid-comment-single-cr.js @@ -4,9 +4,13 @@ /*--- info: Single line comments can not contain CARRIAGE RETURN (U+000D) inside es5id: 7.3_A3.2_T2 +esid: sec-line-terminators description: Insert CARRIAGE RETURN (\u000D) into begin of single line comment +negative: + phase: parse + type: SyntaxError ---*/ -assert.throws(SyntaxError, function() { - eval("//\u000D single line comment"); -}); +$DONOTEVALUATE(); + +// this text is not included in the single-line comment that precedes it diff --git a/test/language/line-terminators/S7.3_A3.1_T3.js b/test/language/line-terminators/invalid-comment-single-lf.js similarity index 100% rename from test/language/line-terminators/S7.3_A3.1_T3.js rename to test/language/line-terminators/invalid-comment-single-lf.js diff --git a/test/language/line-terminators/S7.3_A3.3_T1.js b/test/language/line-terminators/invalid-comment-single-ls.js similarity index 100% rename from test/language/line-terminators/S7.3_A3.3_T1.js rename to test/language/line-terminators/invalid-comment-single-ls.js diff --git a/test/language/line-terminators/S7.3_A3.4_T1.js b/test/language/line-terminators/invalid-comment-single-ps.js similarity index 100% rename from test/language/line-terminators/S7.3_A3.4_T1.js rename to test/language/line-terminators/invalid-comment-single-ps.js