diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/testCaseAbort.js')
-rw-r--r-- | js/src/jit-test/tests/basic/testCaseAbort.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testCaseAbort.js b/js/src/jit-test/tests/basic/testCaseAbort.js new file mode 100644 index 000000000..4e594bb86 --- /dev/null +++ b/js/src/jit-test/tests/basic/testCaseAbort.js @@ -0,0 +1,16 @@ +function testCaseAbort() +{ + var four = "4"; + var r = 0; + for (var i = 0; i < 5; i++) + { + switch (i) + { + case four: r += 1; break; + default: r += 2; break; + } + } + + return "" + r; +} +assertEq(testCaseAbort(), "10"); |