OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Flags: --harmony-arrays | |
6 (function() { | 5 (function() { |
7 | 6 |
8 assertEquals(1, Array.from.length); | 7 assertEquals(1, Array.from.length); |
9 | 8 |
10 function assertArrayLikeEquals(value, expected, type) { | 9 function assertArrayLikeEquals(value, expected, type) { |
11 assertInstanceof(value, type); | 10 assertInstanceof(value, type); |
12 assertEquals(expected.length, value.length); | 11 assertEquals(expected.length, value.length); |
13 for (var i=0; i<value.length; ++i) { | 12 for (var i=0; i<value.length; ++i) { |
14 assertEquals(expected[i], value[i]); | 13 assertEquals(expected[i], value[i]); |
15 } | 14 } |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 assertEquals(true, xlength.writable); | 169 assertEquals(true, xlength.writable); |
171 assertEquals(true, xlength.enumerable); | 170 assertEquals(true, xlength.enumerable); |
172 assertEquals(true, xlength.configurable); | 171 assertEquals(true, xlength.configurable); |
173 var x0 = Object.getOwnPropertyDescriptor(x, 0); | 172 var x0 = Object.getOwnPropertyDescriptor(x, 0); |
174 assertEquals(2, x0.value); | 173 assertEquals(2, x0.value); |
175 assertEquals(true, xlength.writable); | 174 assertEquals(true, xlength.writable); |
176 assertEquals(true, xlength.enumerable); | 175 assertEquals(true, xlength.enumerable); |
177 assertEquals(true, xlength.configurable); | 176 assertEquals(true, xlength.configurable); |
178 | 177 |
179 })(); | 178 })(); |
OLD | NEW |