diff options
Diffstat (limited to 'js/src/jit-test/tests/jaeger/optimize-globals-2.js')
-rw-r--r-- | js/src/jit-test/tests/jaeger/optimize-globals-2.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/optimize-globals-2.js b/js/src/jit-test/tests/jaeger/optimize-globals-2.js new file mode 100644 index 0000000000..2e01cdcb04 --- /dev/null +++ b/js/src/jit-test/tests/jaeger/optimize-globals-2.js @@ -0,0 +1,20 @@ + +function testNaN(x) { + var x = NaN; + assertEq(isNaN(x), true); +} +testNaN(); + +function testInfinity(x) { + return (x === Infinity); +} +assertEq(testInfinity(Infinity), true); +assertEq(testInfinity(6), false); +assertEq(testInfinity(-Infinity), false); + +function testUndefined(x) { + return (x === undefined); +} +assertEq(testUndefined(undefined), true); +assertEq(testUndefined(), true); +assertEq(testUndefined(5), false); |