| Index: test/mjsunit/es6/array-of-2.js
|
| diff --git a/test/mjsunit/es6/array-of-2.js b/test/mjsunit/es6/array-of-2.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0aff56aaa2bccecdbd29a8e49bc53ba147f69daa
|
| --- /dev/null
|
| +++ b/test/mjsunit/es6/array-of-2.js
|
| @@ -0,0 +1,20 @@
|
| +// Copyright 2014 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Based on: https://hg.mozilla.org/mozilla-central/file/d0c3168c3c47/js/src/jit-test/tests/collections/Array-of-2.js
|
| +
|
| +// Flags: --harmony-arrays
|
| +
|
| +
|
| +// Array.of basics
|
| +
|
| +var a = Array.of();
|
| +
|
| +assertEquals(a.length, 0);
|
| +a = Array.of(undefined, null, 3.14, []);
|
| +assertEquals(a, [undefined, null, 3.14, []]);
|
| +a = [];
|
| +for (var i = 0; i < 1000; i++)
|
| + a[i] = i;
|
| +assertEquals(Array.of.apply(null, a), a);
|
|
|