summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug1146836.js
blob: 2b4f4acec84bfa4da6202f41c3e0e3fe317dd02a (plain)
1
2
3
4
5
6
7
8
9
10
11
function f() {
    var s = "switch (x) {";
    for (var i=8000; i<16400; i++) {
	s += "case " + i + ": return " + i + "; break;";
    }
    s += "case 8005: return -1; break;";
    s += "}";
    var g = Function("x", s);
    assertEq(g(8005), 8005);
}
f();