From bd80bf7dfc3de36eb6361f914dc13e90ef9a4071 Mon Sep 17 00:00:00 2001 From: Sam Mikes Date: Thu, 31 Jul 2014 20:50:03 +0100 Subject: [PATCH] es6/Math: use Number.isNaN use number.isNaN to test for NaN pointed out by @anba in #60 --- test/suite/es6/Math.fround/Math.fround_NaN.js | 2 +- test/suite/es6/Math.hypot/Math.hypot_NaN.js | 2 +- test/suite/es6/Math.trunc/Math.trunc_NaN.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/suite/es6/Math.fround/Math.fround_NaN.js b/test/suite/es6/Math.fround/Math.fround_NaN.js index 55f958a206..783ef78e30 100644 --- a/test/suite/es6/Math.fround/Math.fround_NaN.js +++ b/test/suite/es6/Math.fround/Math.fround_NaN.js @@ -13,7 +13,7 @@ includes: [runTestCase.js] ---*/ function testcase() { - if(Math.fround(NaN) === NaN) { + if(Number.isNaN(Math.fround(NaN))) { return true; } } diff --git a/test/suite/es6/Math.hypot/Math.hypot_NaN.js b/test/suite/es6/Math.hypot/Math.hypot_NaN.js index 3077ceb2df..50e7c3bb5c 100644 --- a/test/suite/es6/Math.hypot/Math.hypot_NaN.js +++ b/test/suite/es6/Math.hypot/Math.hypot_NaN.js @@ -15,7 +15,7 @@ includes: [runTestCase.js] ---*/ function testcase() { - if(Math.hypot(NaN, 3) === NaN) { + if(Number.isNaN(Math.hypot(NaN, 3))) { return true; } } diff --git a/test/suite/es6/Math.trunc/Math.trunc_NaN.js b/test/suite/es6/Math.trunc/Math.trunc_NaN.js index 063fd43642..102657f009 100644 --- a/test/suite/es6/Math.trunc/Math.trunc_NaN.js +++ b/test/suite/es6/Math.trunc/Math.trunc_NaN.js @@ -13,7 +13,7 @@ includes: [runTestCase.js] ---*/ function testcase() { - if(Math.trunc(NaN) === NaN) { + if(Number.isNaN(Math.trunc(NaN))) { return true; } }