blob: 60ddd8ceb2ca8e56ae0536d73c7737040f4ab908 [file] [log] [blame]
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)