OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Based on: https://hg.mozilla.org/mozilla-central/file/d0c3168c3c47/js/src/jit
-test/tests/collections/Array-of-3.js |
| 6 |
| 7 // Flags: --harmony-arrays |
| 8 |
| 9 |
| 10 // Array.of does not leave holes |
| 11 |
| 12 assertEquals(Array.of(undefined), [undefined]); |
| 13 assertEquals(Array.of(undefined, undefined), [undefined, undefined]); |
| 14 assertEquals(Array.of.apply(null, [,,undefined]), [undefined, undefined, undefin
ed]); |
| 15 assertEquals(Array.of.apply(null, Array(4)), [undefined, undefined, undefined, u
ndefined]); |
OLD | NEW |