diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/innerLoopIntOuterDouble.js')
-rw-r--r-- | js/src/jit-test/tests/basic/innerLoopIntOuterDouble.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/innerLoopIntOuterDouble.js b/js/src/jit-test/tests/basic/innerLoopIntOuterDouble.js new file mode 100644 index 000000000..be820f956 --- /dev/null +++ b/js/src/jit-test/tests/basic/innerLoopIntOuterDouble.js @@ -0,0 +1,11 @@ +function innerLoopIntOuterDouble() { + var n = 1000, i=0, j=0, count=0, limit=0; + for (i = 1; i <= n; ++i) { + limit = i * 1; + for (j = 0; j < limit; ++j) { + ++count; + } + } + return "" + count; +} +assertEq(innerLoopIntOuterDouble(), "500500"); |