mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 13:34:38 +02:00
chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Infinity (#3085)
This commit is contained in:
parent
0fce065601
commit
02733c5af4
@ -9,21 +9,21 @@ description: Use typeof, isNaN, isFinite
|
||||
|
||||
// CHECK#1
|
||||
if (typeof(Infinity) !== "number") {
|
||||
$ERROR('#1: typeof(Infinity) === "number". Actual: ' + (typeof(Infinity)));
|
||||
throw new Test262Error('#1: typeof(Infinity) === "number". Actual: ' + (typeof(Infinity)));
|
||||
}
|
||||
|
||||
// CHECK#2
|
||||
if (isFinite(Infinity) !== false) {
|
||||
$ERROR('#2: Infinity === Not-a-Finite. Actual: ' + (Infinity));
|
||||
throw new Test262Error('#2: Infinity === Not-a-Finite. Actual: ' + (Infinity));
|
||||
}
|
||||
|
||||
// CHECK#3
|
||||
if (isNaN(Infinity) !== false) {
|
||||
$ERROR('#3: Infinity === Not-a-Number. Actual: ' + (Infinity));
|
||||
throw new Test262Error('#3: Infinity === Not-a-Number. Actual: ' + (Infinity));
|
||||
}
|
||||
|
||||
|
||||
// CHECK#4
|
||||
if (Infinity !== Number.POSITIVE_INFINITY) {
|
||||
$ERROR('#4: Infinity === Number.POSITIVE_INFINITY. Actual: ' + (Infinity));
|
||||
throw new Test262Error('#4: Infinity === Number.POSITIVE_INFINITY. Actual: ' + (Infinity));
|
||||
}
|
||||
|
@ -11,5 +11,5 @@ flags: [noStrict]
|
||||
// CHECK#1
|
||||
Infinity = true;
|
||||
if (typeof(Infinity) === "boolean") {
|
||||
$ERROR('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
|
||||
throw new Test262Error('#1: Infinity = true; typeof(Infinity) !== "boolean". Actual: ' + (typeof(Infinity)));
|
||||
}
|
||||
|
@ -10,5 +10,5 @@ flags: [noStrict]
|
||||
|
||||
// CHECK#1
|
||||
if (delete Infinity !== false) {
|
||||
$ERROR('#1: delete Infinity === false. Actual: ' + (delete Infinity));
|
||||
throw new Test262Error('#1: delete Infinity === false. Actual: ' + (delete Infinity));
|
||||
}
|
||||
|
@ -10,6 +10,6 @@ description: Use for-in statement
|
||||
// CHECK#1
|
||||
for (var prop in this) {
|
||||
if (prop === "Infinity") {
|
||||
$ERROR('#1: The Infinity is DontEnum');
|
||||
throw new Test262Error('#1: The Infinity is DontEnum');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user