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