summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1064537.js
blob: 60ddd8ceb2ca8e56ae0536d73c7737040f4ab908 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function test(a) {
    return (a)?a:0;
}
function test2(a) {
    return (a)?0:a;
}

function isNegativeZero(x) {
    return x===0 && (1/x)===-Infinity;
}

test(0)
assertEq(isNegativeZero(test(-0)), false)
assertEq(isNegativeZero(test(-0)), false)
assertEq(isNegativeZero(test2(-0)), true)
assertEq(isNegativeZero(test2(-0)), true)