summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arguments/defaults-with-arguments.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/arguments/defaults-with-arguments.js')
-rw-r--r--js/src/jit-test/tests/arguments/defaults-with-arguments.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/defaults-with-arguments.js b/js/src/jit-test/tests/arguments/defaults-with-arguments.js
new file mode 100644
index 0000000000..9924c7c238
--- /dev/null
+++ b/js/src/jit-test/tests/arguments/defaults-with-arguments.js
@@ -0,0 +1,10 @@
+function f(a=1, b=2, c=3) { return arguments; }
+var args = f();
+assertEq(args.length, 0);
+assertEq("0" in args, false);
+args = f(5, 6);
+assertEq(args.length, 2);
+assertEq(args[1], 6);
+args = f(9, 8, 7, 6, 5);
+assertEq(args.length, 5);
+assertEq(args[4], 5);