diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/testBranchingLoop.js')
-rw-r--r-- | js/src/jit-test/tests/basic/testBranchingLoop.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testBranchingLoop.js b/js/src/jit-test/tests/basic/testBranchingLoop.js new file mode 100644 index 000000000..5c302425f --- /dev/null +++ b/js/src/jit-test/tests/basic/testBranchingLoop.js @@ -0,0 +1,11 @@ +function testBranchingLoop() { + var x = 0; + for (var i=0; i < 100; ++i) { + if (i == 51) { + x += 10; + } + x++; + } + return x; +} +assertEq(testBranchingLoop(), 110); |