summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Array-of-3.js
blob: e2bcbff7a14d7b1447ece78ff0daeebf8c9fa6b4 (plain)
1
2
3
4
5
6
7
8
// Array.of does not leave holes

load(libdir + "asserts.js");

assertDeepEq(Array.of(undefined), [undefined]);
assertDeepEq(Array.of(undefined, undefined), [undefined, undefined]);
assertDeepEq(Array.of.apply(this, [,,undefined]), [undefined, undefined, undefined]);
assertDeepEq(Array.of.apply(this, Array(4)), [undefined, undefined, undefined, undefined]);