mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 23:44:27 +02:00
Replace runTestCase with assert helpers [test/language/line-terminators]
This commit is contained in:
parent
31f027dc03
commit
4c582732d0
@ -6,12 +6,10 @@ es5id: 7.3-1
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <LS> (\u2028) as line
|
7.3 - ES5 recognizes the character <LS> (\u2028) as line
|
||||||
terminators when parsing statements
|
terminators when parsing statements
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var test7_3_1, prop;
|
var test7_3_1, prop;
|
||||||
eval("test7_3_1\u2028prop = 66;");
|
eval("test7_3_1\u2028prop = 66;");
|
||||||
return (prop === 66) && ((typeof test7_3_1) === "undefined");
|
|
||||||
}
|
assert.sameValue(prop, 66, 'prop');
|
||||||
runTestCase(testcase);
|
assert.sameValue((typeof test7_3_1), "undefined", '(typeof test7_3_1)');
|
||||||
|
@ -7,14 +7,9 @@ description: >
|
|||||||
7.3 - ES5 specifies that a multiline comment that contains a line
|
7.3 - ES5 specifies that a multiline comment that contains a line
|
||||||
terminator character <LS> (\u2028) must be treated as a single
|
terminator character <LS> (\u2028) must be treated as a single
|
||||||
line terminator for the purposes of semicolon insertion
|
line terminator for the purposes of semicolon insertion
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
/*MultiLine
|
/*MultiLine
|
||||||
Comments
|
Comments
|
||||||
\u2028 var = ;
|
\u2028 var = ;
|
||||||
*/
|
*/
|
||||||
return true;
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,14 +7,9 @@ description: >
|
|||||||
7.3 - ES5 specifies that a multiline comment that contains a line
|
7.3 - ES5 specifies that a multiline comment that contains a line
|
||||||
terminator character <PS> (\u2029) must be treated as a single
|
terminator character <PS> (\u2029) must be treated as a single
|
||||||
line terminator for the purposes of semicolon insertion
|
line terminator for the purposes of semicolon insertion
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
/*MultiLine
|
/*MultiLine
|
||||||
Comments
|
Comments
|
||||||
\u2029 var = ;
|
\u2029 var = ;
|
||||||
*/
|
*/
|
||||||
return true;
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,14 +7,9 @@ description: >
|
|||||||
7.3 - ES5 specifies that a multiline comment that contains a line
|
7.3 - ES5 specifies that a multiline comment that contains a line
|
||||||
terminator character <CR> (\u000D) must be treated as a single
|
terminator character <CR> (\u000D) must be treated as a single
|
||||||
line terminator for the purposes of semicolon insertion
|
line terminator for the purposes of semicolon insertion
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
/*MultiLine
|
/*MultiLine
|
||||||
Comments
|
Comments
|
||||||
\u000D var = ;
|
\u000D var = ;
|
||||||
*/
|
*/
|
||||||
return true;
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -7,14 +7,9 @@ description: >
|
|||||||
7.3 - ES5 specifies that a multiline comment that contains a line
|
7.3 - ES5 specifies that a multiline comment that contains a line
|
||||||
terminator character <LF> (\u000A) must be treated as a single
|
terminator character <LF> (\u000A) must be treated as a single
|
||||||
line terminator for the purposes of semicolon insertion
|
line terminator for the purposes of semicolon insertion
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
/*MultiLine
|
/*MultiLine
|
||||||
Comments
|
Comments
|
||||||
\u000A var = ;
|
\u000A var = ;
|
||||||
*/
|
*/
|
||||||
return true;
|
|
||||||
}
|
|
||||||
runTestCase(testcase);
|
|
||||||
|
@ -4,11 +4,10 @@
|
|||||||
/*---
|
/*---
|
||||||
es5id: 7.3-15
|
es5id: 7.3-15
|
||||||
description: 7.3 - ES5 recognize <BOM> (\uFFFF) as a whitespace character
|
description: 7.3 - ES5 recognize <BOM> (\uFFFF) as a whitespace character
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var prop = "a\uFFFFa";
|
var prop = "a\uFFFFa";
|
||||||
return prop.length === 3 && prop !== "aa" && prop[1] === "\uFFFF";
|
|
||||||
}
|
assert.sameValue(prop.length, 3, 'prop.length');
|
||||||
runTestCase(testcase);
|
assert.notSameValue(prop, "aa", 'prop');
|
||||||
|
assert.sameValue(prop[1], "\uFFFF", 'prop[1]');
|
||||||
|
@ -6,12 +6,10 @@ es5id: 7.3-2
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <PS> (\u2029) as line
|
7.3 - ES5 recognizes the character <PS> (\u2029) as line
|
||||||
terminators when parsing statements
|
terminators when parsing statements
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var test7_3_2, prop;
|
var test7_3_2, prop;
|
||||||
eval("test7_3_2\u2029prop = 66;");
|
eval("test7_3_2\u2029prop = 66;");
|
||||||
return (prop===66) && ((typeof test7_3_2) === "undefined");
|
|
||||||
}
|
assert.sameValue(prop, 66, 'prop');
|
||||||
runTestCase(testcase);
|
assert.sameValue((typeof test7_3_2), "undefined", '(typeof test7_3_2)');
|
||||||
|
@ -6,11 +6,10 @@ es5id: 7.3-5
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <LS> (\u2028) as terminating
|
7.3 - ES5 recognizes the character <LS> (\u2028) as terminating
|
||||||
string literal
|
string literal
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var prop = "66\u2028123";
|
var prop = "66\u2028123";
|
||||||
return prop === "66\u2028123" && prop[2] === "\u2028" && prop.length === 6;
|
|
||||||
}
|
assert.sameValue(prop, "66\u2028123", 'prop');
|
||||||
runTestCase(testcase);
|
assert.sameValue(prop[2], "\u2028", 'prop[2]');
|
||||||
|
assert.sameValue(prop.length, 6, 'prop.length');
|
||||||
|
@ -6,11 +6,10 @@ es5id: 7.3-6
|
|||||||
description: >
|
description: >
|
||||||
7.3 - ES5 recognizes the character <PS> (\u2029) as terminating
|
7.3 - ES5 recognizes the character <PS> (\u2029) as terminating
|
||||||
string literal
|
string literal
|
||||||
includes: [runTestCase.js]
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
|
||||||
var prop = "66\u2029123";
|
var prop = "66\u2029123";
|
||||||
return prop === "66\u2029123" && prop[2] === "\u2029" && prop.length === 6;
|
|
||||||
}
|
assert.sameValue(prop, "66\u2029123", 'prop');
|
||||||
runTestCase(testcase);
|
assert.sameValue(prop[2], "\u2029", 'prop[2]');
|
||||||
|
assert.sameValue(prop.length, 6, 'prop.length');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user