summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBranchingUnstableLoop.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testBranchingUnstableLoop.js')
-rw-r--r--js/src/jit-test/tests/basic/testBranchingUnstableLoop.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testBranchingUnstableLoop.js b/js/src/jit-test/tests/basic/testBranchingUnstableLoop.js
new file mode 100644
index 000000000..f8333ecff
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testBranchingUnstableLoop.js
@@ -0,0 +1,11 @@
+function testBranchingUnstableLoop() {
+ var x = 0;
+ for (var i=0; i < 100; ++i) {
+ if (i == 51) {
+ x += 10.1;
+ }
+ x++;
+ }
+ return x;
+}
+assertEq(testBranchingUnstableLoop(), 110.1);