1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/ion/bug736141.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,18 @@ 1.4 +function test(i) { 1.5 + return i * 0 + 0; 1.6 +} 1.7 + 1.8 +for(var i=0; i<100; i++){ 1.9 + var x = test(-i); 1.10 + assertEq((x===0 && (1/x)===-Infinity), false); // value should be 0, not -0 1.11 +} 1.12 + 1.13 +function test2(i) { 1.14 + return 0 - i; 1.15 +} 1.16 + 1.17 +for(var i=-100; i<100; i++){ 1.18 + var x = test2(-i); 1.19 + assertEq(x, i); 1.20 +} 1.21 +