summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/args-mutate-length-1.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/arguments/args-mutate-length-1.js')
-rw-r--r--js/src/jit-test/tests/arguments/args-mutate-length-1.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/args-mutate-length-1.js b/js/src/jit-test/tests/arguments/args-mutate-length-1.js
new file mode 100644
index 000000000..cea55bc36
--- /dev/null
+++ b/js/src/jit-test/tests/arguments/args-mutate-length-1.js
@@ -0,0 +1,16 @@
+actual = '';
+expected = '0,0,0,';
+
+function f() {
+ arguments.length--;
+ for (var i = 0; i < arguments.length; ++i) {
+ appendToActual(i);
+ }
+}
+
+f(1, 2);
+f(1, 2);
+f(2, 2);
+
+
+assertEq(actual, expected)