mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
chore: migrate $ERROR -> throw new Test262Error in test/language/f* (#3099)
This commit is contained in:
parent
0947f287ae
commit
e5ab3a572e
@ -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');
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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'");
|
||||
}
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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"');
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user