bug1064537.js (332B)
1 function test(a) { 2 return (a)?a:0; 3 } 4 function test2(a) { 5 return (a)?0:a; 6 } 7 8 function isNegativeZero(x) { 9 return x===0 && (1/x)===-Infinity; 10 } 11 12 test(0) 13 assertEq(isNegativeZero(test(-0)), false) 14 assertEq(isNegativeZero(test(-0)), false) 15 assertEq(isNegativeZero(test2(-0)), true) 16 assertEq(isNegativeZero(test2(-0)), true)