summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/setArgumentsLength.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/setArgumentsLength.js')
-rw-r--r--js/src/jit-test/tests/basic/setArgumentsLength.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/setArgumentsLength.js b/js/src/jit-test/tests/basic/setArgumentsLength.js
new file mode 100644
index 0000000000..775d3ef9f2
--- /dev/null
+++ b/js/src/jit-test/tests/basic/setArgumentsLength.js
@@ -0,0 +1,14 @@
+var count = 0;
+
+function f() {
+ arguments.length--;
+ for (var i = 0; i < arguments.length; ++i) {
+ ++count;
+ }
+}
+
+f(1, 2);
+f(1, 2);
+f(2, 2);
+
+assertEq(count, 3);