summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Array-of-2.js
blob: 26836eaaf3ec935073afa91c982f48e92bddece3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Array.of basics

load(libdir + "asserts.js");

var a = Array.of();
assertEq(a.length, 0);

a = Array.of(undefined, null, 3.14, []);
assertDeepEq(a, [undefined, null, 3.14, []]);

a = [];
for (var i = 0; i < 1000; i++)
    a[i] = i;
assertDeepEq(Array.of.apply({}, a), a);