chore: migrate $ERROR -> throw new Test262Error in test/language/f* (#3099)

This commit is contained in:
Rick Waldron 2021-07-28 16:47:49 -04:00 committed by GitHub
parent 0947f287ae
commit e5ab3a572e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 18 deletions

View File

@ -16,4 +16,4 @@ function f1(a){
return a;
}
if (f1(1) !== 1)
$ERROR('#1: Function parameter was deleted');
throw new Test262Error('#1: Function parameter was deleted');

View File

@ -14,9 +14,9 @@ function f1(a, b){
return (b === undefined);
}
if(!(f1(1, 2) === false)){
$ERROR('#1: f1(1, 2) === false');
throw new Test262Error('#1: f1(1, 2) === false');
} else if(!(f1(1) === true)){
$ERROR('#1: f1(1) === true');
throw new Test262Error('#1: f1(1) === true');
}
//CHECK#2
@ -24,5 +24,5 @@ function f2(a, b, c){
return (b === undefined) && (c === undefined);
}
if(!(f2(1) === true)){
$ERROR('#2: f2(1) === true');
throw new Test262Error('#2: f2(1) === true');
}

View File

@ -18,7 +18,7 @@ function f1(x, x) {
return x;
}
if(!(f1(1, 2) === 2)) {
$ERROR("#1: f1(1, 2) === 2");
throw new Test262Error("#1: f1(1, 2) === 2");
}
//CHECK#2
@ -26,7 +26,7 @@ function f2(x, x, x){
return x*x*x;
}
if(!(f2(1, 2, 3) === 27)){
$ERROR("f2(1, 2, 3) === 27");
throw new Test262Error("f2(1, 2, 3) === 27");
}
//CHECK#3
@ -34,5 +34,5 @@ function f3(x, x) {
return 'a' + x;
}
if(!(f3(1, 2) === 'a2')){
$ERROR("#3: f3(1, 2) === 'a2'");
throw new Test262Error("#3: f3(1, 2) === 'a2'");
}

View File

@ -19,5 +19,5 @@ function f1(x, a, b, x){
return x;
}
if(!(f1(1, 2) === undefined)){
$ERROR('#1: f1(1, 2) === undefined');
throw new Test262Error('#1: f1(1, 2) === undefined');
}

View File

@ -21,7 +21,7 @@ function f1(x){
}
}
if(!(f1().constructor.prototype === Function.prototype)){
$ERROR('#1: f1() returns function');
throw new Test262Error('#1: f1() returns function');
}
//CHECK#2
@ -33,7 +33,7 @@ function f2(x){
}
}
if(!(f2() === "function")){
$ERROR('#2: f2() === "function"');
throw new Test262Error('#2: f2() === "function"');
}
//CHECK#3
@ -44,5 +44,5 @@ function f3() {
}
}
if (!(f3() === "function")){
$ERROR('#3: f3() === "function"');
throw new Test262Error('#3: f3() === "function"');
}

View File

@ -11,5 +11,5 @@ flags: [onlyStrict]
var that = (function() { return this; })();
if (that !== undefined) {
$ERROR('#1: "this" leaked as: ' + that);
throw new Test262Error('#1: "this" leaked as: ' + that);
}

View File

@ -27,5 +27,5 @@ function f(a){
y = f(0);
if(!(y === undefined)){
$ERROR("#1: Recursive function calls shares execution context");
throw new Test262Error("#1: Recursive function calls shares execution context");
}

View File

@ -25,5 +25,5 @@ y = f();
y = f();
if(!(y === 0)){
$ERROR("#1: Sequenced function calls shares execution context");
throw new Test262Error("#1: Sequenced function calls shares execution context");
}