mirror of https://github.com/tc39/test262.git
chore: migrate $ERROR -> throw new Test262Error in test/language/white-space/* (#3107)
This commit is contained in:
parent
758ecd7895
commit
2581a439a5
|
@ -9,5 +9,5 @@ description: Use real HORIZONTAL TAB
|
|||
|
||||
//CHECK#1
|
||||
if (" str ing " !== "\u0009str\u0009ing\u0009") {
|
||||
$ERROR('#1: " str ing " === "\\u0009str\\u0009ing\\u0009"');
|
||||
throw new Test262Error('#1: " str ing " === "\\u0009str\\u0009ing\\u0009"');
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ description: Use real VERTICAL TAB
|
|||
|
||||
//CHECK#1
|
||||
if ("string" !== "\u000Bstr\u000Bing\u000B") {
|
||||
$ERROR('#1: "string" === "\\u000Bstr\\u000Bing\\u000B"');
|
||||
throw new Test262Error('#1: "string" === "\\u000Bstr\\u000Bing\\u000B"');
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ description: Use real FORM FEED
|
|||
|
||||
//CHECK#1
|
||||
if ("string" !== "\u000Cstr\u000Cing\u000C") {
|
||||
$ERROR('#1: "string" === "\\u000Cstr\\u000Cing\\u000C"');
|
||||
throw new Test262Error('#1: "string" === "\\u000Cstr\\u000Cing\\u000C"');
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ description: Use real SPACE
|
|||
|
||||
//CHECK#1
|
||||
if (" str ing " !== "\u0020str\u0020ing\u0020") {
|
||||
$ERROR('#1: " str ing " === "\\u0020str\\u0020ing\\u0020"');
|
||||
throw new Test262Error('#1: " str ing " === "\\u0020str\\u0020ing\\u0020"');
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ description: Use real NO-BREAK SPACE
|
|||
|
||||
//CHECK#1
|
||||
if (" str ing " !== "\u00A0str\u00A0ing\u00A0") {
|
||||
$ERROR('#1: " str ing " === "\\u00A0str\\u00A0ing\\u00A0"');
|
||||
throw new Test262Error('#1: " str ing " === "\\u00A0str\\u00A0ing\\u00A0"');
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real HORIZONTAL TAB
|
|||
var x = 0;
|
||||
// single line comment x = 1;
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real VERTICAL TAB
|
|||
var x = 0;
|
||||
//singlelinecommentx = 1;
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; //singlelinecommentx = 1; x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; //singlelinecommentx = 1; x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real FORM FEED
|
|||
var x = 0;
|
||||
//singlelinecommentx = 1;
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; //singlelinecommentx = 1; x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; //singlelinecommentx = 1; x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real SPACE
|
|||
var x = 0;
|
||||
// single line comment x = 1;
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real NO-BREAK SPACE
|
|||
var x = 0;
|
||||
// single line comment x = 1;
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real HORIZONTAL TAB
|
|||
var x = 0;
|
||||
/* multi line comment x = 1;*/
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real VERTICAL TAB
|
|||
var x = 0;
|
||||
/*multilinecommentx = 1;*/
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; /*multilinecommentx = 1;*/ x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; /*multilinecommentx = 1;*/ x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real FORM FEED
|
|||
var x = 0;
|
||||
/*multilinecommentx = 1;*/
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; /*multilinecommentx = 1;*/ x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; /*multilinecommentx = 1;*/ x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real SPACE
|
|||
var x = 0;
|
||||
/* multi line comment x = 1;*/
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -11,5 +11,5 @@ description: Use real NO-BREAK SPACE
|
|||
var x = 0;
|
||||
/* multi line comment x = 1;*/
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("/*\u000C multi line \u000C comment \u000C*/");
|
|||
var x = 0;
|
||||
eval("/*\u000C multi line \u000C comment \u000C x = 1;*/");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("/*\\u000C multi line \\u000C comment \\u000C x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("/*\\u000C multi line \\u000C comment \\u000C x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("/*\u0009 multi line \u0009 comment \u0009*/");
|
|||
var x = 0;
|
||||
eval("/*\u0009 multi line \u0009 comment \u0009 x = 1;*/");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("/*\\u0009 multi line \\u0009 comment \\u0009 x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("/*\\u0009 multi line \\u0009 comment \\u0009 x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("/*\u00A0 multi line \u00A0 comment \u00A0*/");
|
|||
var x = 0;
|
||||
eval("/*\u00A0 multi line \u00A0 comment \u00A0 x = 1;*/");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("/*\\u00A0 multi line \\u00A0 comment \\u00A0 x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("/*\\u00A0 multi line \\u00A0 comment \\u00A0 x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("/*\u0020 multi line \u0020 comment \u0020*/");
|
|||
var x = 0;
|
||||
eval("/*\u0020 multi line \u0020 comment \u0020 x = 1;*/");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("/*\\u0020 multi line \\u0020 comment \\u0020 x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("/*\\u0020 multi line \\u0020 comment \\u0020 x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("/*\u000B multi line \u000B comment \u000B*/");
|
|||
var x = 0;
|
||||
eval("/*\u000B multi line \u000B comment \u000B x = 1;*/");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("/*\\u000B multi line \\u000B comment \\u000B x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("/*\\u000B multi line \\u000B comment \\u000B x = 1;*/"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("//\u000C single line \u000C comment \u000C");
|
|||
var x = 0;
|
||||
eval("//\u000C single line \u000C comment \u000C x = 1;");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("//\\u000C single line \\u000C comment \\u000C x = 1;"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("//\\u000C single line \\u000C comment \\u000C x = 1;"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("//\u0009 single line \u0009 comment \u0009");
|
|||
var x = 0;
|
||||
eval("//\u0009 single line \u0009 comment \u0009 x = 1;");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("//\\u0009 single line \\u0009 comment \\u0009 x = 1;"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("//\\u0009 single line \\u0009 comment \\u0009 x = 1;"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("//\u00A0 single line \u00A0 comment \u00A0");
|
|||
var x = 0;
|
||||
eval("//\u00A0 single line \u00A0 comment \u00A0 x = 1;");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("//\\u00A0 single line \\u00A0 comment \\u00A0 x = 1;"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("//\\u00A0 single line \\u00A0 comment \\u00A0 x = 1;"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("//\u0020 single line \u0020 comment \u0020");
|
|||
var x = 0;
|
||||
eval("//\u0020 single line \u0020 comment \u0020 x = 1;");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("//\\u0020 single line \\u0020 comment \\u0020 x = 1;"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("//\\u0020 single line \\u0020 comment \\u0020 x = 1;"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ eval("//\u000B single line \u000B comment \u000B");
|
|||
var x = 0;
|
||||
eval("//\u000B single line \u000B comment \u000B x = 1;");
|
||||
if (x !== 0) {
|
||||
$ERROR('#1: var x = 0; eval("//\\u000B single line \\u000B comment \\u000B x = 1;"); x === 0. Actual: ' + (x));
|
||||
throw new Test262Error('#1: var x = 0; eval("//\\u000B single line \\u000B comment \\u000B x = 1;"); x === 0. Actual: ' + (x));
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ description: Use FORM FEED(\u000C and \f)
|
|||
|
||||
// CHECK#1
|
||||
if (eval("'\u000Cstr\u000Cing\u000C'") !== "\u000Cstr\u000Cing\u000C") {
|
||||
$ERROR('#1: eval("\'\\u000Cstr\\u000Cing\\u000C\'") === "\\u000Cstr\\u000Cing\\u000C"');
|
||||
throw new Test262Error('#1: eval("\'\\u000Cstr\\u000Cing\\u000C\'") === "\\u000Cstr\\u000Cing\\u000C"');
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (eval("'\fstr\fing\f'") !== "\fstr\fing\f") {
|
||||
$ERROR('#2: eval("\'\\fstr\\fing\\f\'") === "\\fstr\\fing\\f"');
|
||||
throw new Test262Error('#2: eval("\'\\fstr\\fing\\f\'") === "\\fstr\\fing\\f"');
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ description: Use HORIZONTAL TAB(\u0009 and \t)
|
|||
|
||||
// CHECK#1
|
||||
if (eval("'\u0009str\u0009ing\u0009'") !== "\u0009str\u0009ing\u0009") {
|
||||
$ERROR('#1: eval("\'\\u0009str\\u0009ing\\u0009\'") === "\\u0009str\\u0009ing\\u0009"');
|
||||
throw new Test262Error('#1: eval("\'\\u0009str\\u0009ing\\u0009\'") === "\\u0009str\\u0009ing\\u0009"');
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (eval("'\tstr\ting\t'") !== "\tstr\ting\t") {
|
||||
$ERROR('#2: eval("\'\\tstr\\ting\\t\'") === "\\tstr\\ting\\t"');
|
||||
throw new Test262Error('#2: eval("\'\\tstr\\ting\\t\'") === "\\tstr\\ting\\t"');
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ description: Use NO-BREAK SPACE(\u00A0)
|
|||
|
||||
// CHECK#1
|
||||
if (eval("'\u00A0str\u00A0ing\u00A0'") !== "\u00A0str\u00A0ing\u00A0") {
|
||||
$ERROR('#1: eval("\'\\u00A0str\\u00A0ing\\u00A0\'") === "\\u00A0str\\u00A0ing\\u00A0"');
|
||||
throw new Test262Error('#1: eval("\'\\u00A0str\\u00A0ing\\u00A0\'") === "\\u00A0str\\u00A0ing\\u00A0"');
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ description: Use SPACE(\u0020)
|
|||
|
||||
// CHECK#1
|
||||
if (eval("'\u0020str\u0020ing\u0020'") !== "\u0020str\u0020ing\u0020") {
|
||||
$ERROR('#1: eval("\'\\u0020str\\u0020ing\\u0020\'") === "\\u0020str\\u0020ing\\u0020"');
|
||||
throw new Test262Error('#1: eval("\'\\u0020str\\u0020ing\\u0020\'") === "\\u0020str\\u0020ing\\u0020"');
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (eval("' str ing '") !== " str ing ") {
|
||||
$ERROR('#2: eval("\' str ing \'") === " str ing "');
|
||||
throw new Test262Error('#2: eval("\' str ing \'") === " str ing "');
|
||||
}
|
||||
|
|
|
@ -9,10 +9,10 @@ description: Use VERTICAL TAB(\u000B and \v)
|
|||
|
||||
// CHECK#1
|
||||
if (eval("'\u000Bstr\u000Bing\u000B'") !== "\u000Bstr\u000Bing\u000B") {
|
||||
$ERROR('#1: eval("\'\\u000Bstr\\u000Bing\\u000B\'") === "\\u000Bstr\\u000Bing\\u000B"');
|
||||
throw new Test262Error('#1: eval("\'\\u000Bstr\\u000Bing\\u000B\'") === "\\u000Bstr\\u000Bing\\u000B"');
|
||||
}
|
||||
|
||||
//CHECK#2
|
||||
if (eval("'\vstr\ving\v'") !== "\vstr\ving\v") {
|
||||
$ERROR('#2: eval("\'\\vstr\\ving\\v\'") === "\\vstr\\ving\\v"');
|
||||
throw new Test262Error('#2: eval("\'\\vstr\\ving\\v\'") === "\\vstr\\ving\\v"');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue