blob: 8d5ce5b7959a880dec0aba2ad9720405e08864c6 [file] [log] [blame]
function foo(char) {
switch (char) {
case "a":
return 1;
case "b":
return 2;
case "c":
return 3;
default:
return 4;
}
}
function bar() {
var result = 0;
for (var i = 0; i < 1000000; ++i)
result += foo("a");
return result;
}
var result = bar();
if (result != 1000000)
throw "Error: bad result: " + result;