1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/basic/testConstSwitch.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,13 @@ 1.4 +// No test case, just make sure this doesn't assert. 1.5 +function testNegZero2() { 1.6 + var z = 0; 1.7 + for (let j = 0; j < 5; ++j) { ({p: (-z)}); } 1.8 +} 1.9 +testNegZero2(); 1.10 + 1.11 +function testConstSwitch() { 1.12 + var x; 1.13 + for (var j=0;j<5;++j) { switch(1.1) { case NaN: case 2: } x = 2; } 1.14 + return x; 1.15 +} 1.16 +assertEq(testConstSwitch(), 2);