mirror of
https://github.com/tc39/test262.git
synced 2025-07-25 15:04:43 +02:00
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:
parent
1a30a69d12
commit
6230065d07
@ -9,5 +9,5 @@ description: Checking isFinite.prototype
|
|||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (isFinite.prototype !== undefined) {
|
if (isFinite.prototype !== undefined) {
|
||||||
$ERROR('#1: isFinite.prototype === undefined. Actual: ' + (isFinite.prototype));
|
throw new Test262Error('#1: isFinite.prototype === undefined. Actual: ' + (isFinite.prototype));
|
||||||
}
|
}
|
||||||
|
@ -13,9 +13,8 @@ description: >
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
new isFinite();
|
new isFinite();
|
||||||
$ERROR('#1.1: new isFinite() throw TypeError. Actual: ' + (new isFinite()));
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if ((e instanceof TypeError) !== true) {
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,5 @@ description: Checking isNaN.prototype
|
|||||||
|
|
||||||
//CHECK#1
|
//CHECK#1
|
||||||
if (isNaN.prototype !== undefined) {
|
if (isNaN.prototype !== undefined) {
|
||||||
$ERROR('#1: isNaN.prototype === undefined. Actual: ' + (isNaN.prototype));
|
throw new Test262Error('#1: isNaN.prototype === undefined. Actual: ' + (isNaN.prototype));
|
||||||
}
|
}
|
||||||
|
@ -13,9 +13,8 @@ description: >
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
new isNaN();
|
new isNaN();
|
||||||
$ERROR('#1.1: new isNaN() throw TypeError. Actual: ' + (new isNaN()));
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if ((e instanceof TypeError) !== true) {
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user