summaryrefslogtreecommitdiff
path: root/js/src/jit-test/tests/basic/testTypeUnstableForIn.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testTypeUnstableForIn.js')
-rw-r--r--js/src/jit-test/tests/basic/testTypeUnstableForIn.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testTypeUnstableForIn.js b/js/src/jit-test/tests/basic/testTypeUnstableForIn.js
new file mode 100644
index 0000000..0f6b10b
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testTypeUnstableForIn.js
@@ -0,0 +1,10 @@
+function testTypeUnstableForIn() {
+ var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16];
+ var x = 0;
+ for (var i in a) {
+ i = parseInt(i);
+ x++;
+ }
+ return x;
+}
+assertEq(testTypeUnstableForIn(), 16);