michael@0: function testTableSwitch2() { michael@0: var arr = [2, 2, 2, 2, 2, 5, 2, 2, 5, 5, 5, 5, 5, 5, 5, 5]; michael@0: var s = ''; michael@0: for (var i = 0; i < arr.length; i++) { michael@0: switch (arr[i]) { michael@0: case 0: case 1: case 3: case 4: michael@0: throw "FAIL"; michael@0: case 2: michael@0: s += '2'; michael@0: break; michael@0: case 5: michael@0: s += '5'; michael@0: } michael@0: } michael@0: assertEq(s, arr.join("")); michael@0: } michael@0: michael@0: testTableSwitch2();