summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testLoopWithUndefined1.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testLoopWithUndefined1.js')
-rw-r--r--js/src/jit-test/tests/basic/testLoopWithUndefined1.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testLoopWithUndefined1.js b/js/src/jit-test/tests/basic/testLoopWithUndefined1.js
new file mode 100644
index 0000000000..63c4b97a8f
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testLoopWithUndefined1.js
@@ -0,0 +1,12 @@
+function loopWithUndefined1(t, val) {
+ var a = new Array(6);
+ for (var i = 0; i < 6; i++)
+ a[i] = (t > val);
+ return a;
+}
+loopWithUndefined1(5.0, 2); //compile version with val=int
+
+function testLoopWithUndefined1() {
+ return loopWithUndefined1(5.0).join(","); //val=undefined
+};
+assertEq(testLoopWithUndefined1(), "false,false,false,false,false,false");