summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testSlowArrayLength.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testSlowArrayLength.js')
-rw-r--r--js/src/jit-test/tests/basic/testSlowArrayLength.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testSlowArrayLength.js b/js/src/jit-test/tests/basic/testSlowArrayLength.js
new file mode 100644
index 000000000..f19ec4bfa
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testSlowArrayLength.js
@@ -0,0 +1,10 @@
+function testSlowArrayLength()
+{
+ var counter = 0;
+ var a = [];
+ a[10000 - 1] = 0;
+ for (var i = 0; i < a.length; i++)
+ counter++;
+ return counter;
+}
+assertEq(testSlowArrayLength(), 10000);