summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/inlining/isNaNInline.js
blob: f8c92e0753e8ad42bbe6704f95cf9f1037f57bd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
}