mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
es6/Math: use Number.isNaN
use number.isNaN to test for NaN pointed out by @anba in #60
This commit is contained in:
parent
413e16e355
commit
bd80bf7dfc
@ -13,7 +13,7 @@ includes: [runTestCase.js]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
function testcase() {
|
||||||
if(Math.fround(NaN) === NaN) {
|
if(Number.isNaN(Math.fround(NaN))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ includes: [runTestCase.js]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
function testcase() {
|
||||||
if(Math.hypot(NaN, 3) === NaN) {
|
if(Number.isNaN(Math.hypot(NaN, 3))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ includes: [runTestCase.js]
|
|||||||
---*/
|
---*/
|
||||||
|
|
||||||
function testcase() {
|
function testcase() {
|
||||||
if(Math.trunc(NaN) === NaN) {
|
if(Number.isNaN(Math.trunc(NaN))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user