chore: migrate $ERROR -> throw new Test262Error in test/built-ins/isFinite,isNaN (#3086)

* chore: migrate $ERROR -> throw new Test262Error in test/built-ins/isFinite,isNaN

* Update test/built-ins/isFinite/S15.1.2.5_A2.7.js

Co-authored-by: Leo Balter <leonardo.balter@gmail.com>

* Update test/built-ins/isNaN/S15.1.2.4_A2.7.js

Co-authored-by: Leo Balter <leonardo.balter@gmail.com>

Co-authored-by: Leo Balter <leonardo.balter@gmail.com>
This commit is contained in:
Rick Waldron 2021-07-21 15:41:06 -04:00 committed by GitHub
parent 1a30a69d12
commit 6230065d07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 6 deletions

View File

@ -9,5 +9,5 @@ description: Checking isFinite.prototype
//CHECK#1
if (isFinite.prototype !== undefined) {
$ERROR('#1: isFinite.prototype === undefined. Actual: ' + (isFinite.prototype));
throw new Test262Error('#1: isFinite.prototype === undefined. Actual: ' + (isFinite.prototype));
}

View File

@ -13,9 +13,8 @@ description: >
try {
new isFinite();
$ERROR('#1.1: new isFinite() throw TypeError. Actual: ' + (new isFinite()));
} catch (e) {
if ((e instanceof TypeError) !== true) {
$ERROR('#1.2: new isFinite() throw TypeError. Actual: ' + (e));
throw new Test262Error('#1.2: new isFinite() throw TypeError. Actual: ' + (e));
}
}

View File

@ -9,5 +9,5 @@ description: Checking isNaN.prototype
//CHECK#1
if (isNaN.prototype !== undefined) {
$ERROR('#1: isNaN.prototype === undefined. Actual: ' + (isNaN.prototype));
throw new Test262Error('#1: isNaN.prototype === undefined. Actual: ' + (isNaN.prototype));
}

View File

@ -13,9 +13,8 @@ description: >
try {
new isNaN();
$ERROR('#1.1: new isNaN() throw TypeError. Actual: ' + (new isNaN()));
} catch (e) {
if ((e instanceof TypeError) !== true) {
$ERROR('#1.2: new isNaN() throw TypeError. Actual: ' + (e));
throw new Test262Error('#1.2: new isNaN() throw TypeError. Actual: ' + (e));
}
}