chore: migrate $ERROR -> throw new Test262Error in test/built-ins/Infinity (#3085)

This commit is contained in:
Rick Waldron 2021-07-21 15:07:41 -04:00 committed by GitHub
parent 0fce065601
commit 02733c5af4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -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));
}

View File

@ -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)));
}

View File

@ -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));
}

View File

@ -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');
}
}