js/src/jit-test/tests/arguments/rest-underflow.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/arguments/rest-underflow.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,9 @@
     1.4 +function f(a, b, c, ...rest) {
     1.5 +    assertEq(a, 1);
     1.6 +    assertEq(b, undefined);
     1.7 +    assertEq(c, undefined);
     1.8 +    assertEq(Array.isArray(rest), true);
     1.9 +    assertEq(rest.length, 0);
    1.10 +    assertEq(Object.getPrototypeOf(rest), Array.prototype);
    1.11 +}
    1.12 +f(1);

mercurial