summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/optimize-globals-2.js
blob: 2e01cdcb047f079261bc84378d09f7525566f506 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);