testDoubleZeroInSwitch1.js (236B)
1 var a = Math.sin(Math.PI/2); // spec does not specify precise answer here... 2 if (a === 1) { // ...but if a === 1 here... 3 switch (a) { 4 case 1: break; // ...then it must also match here 5 default: throw "FAIL"; 6 } 7 }