diff options
Diffstat (limited to 'js/src/jit-test/tests/ion/inlining/isNaNInline.js')
-rw-r--r-- | js/src/jit-test/tests/ion/inlining/isNaNInline.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/inlining/isNaNInline.js b/js/src/jit-test/tests/ion/inlining/isNaNInline.js new file mode 100644 index 0000000000..f8c92e0753 --- /dev/null +++ b/js/src/jit-test/tests/ion/inlining/isNaNInline.js @@ -0,0 +1,15 @@ +/* Test inlining of Number.isNaN() */ + +for (var i = 0; i < 200000; i++) { + assertEq(Number.isNaN(NaN), true); + assertEq(Number.isNaN(-NaN), true); + assertEq(Number.isNaN(+Infinity), false); + assertEq(Number.isNaN(-Infinity), false); + assertEq(Number.isNaN(3.14159), false); + assertEq(Number.isNaN(-3.14159), false); + assertEq(Number.isNaN(3), false); + assertEq(Number.isNaN(-3), false); + assertEq(Number.isNaN(+0), false); + assertEq(Number.isNaN(-0), false); + assertEq(Number.isNaN({}), false); +} |