| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 | |
| 7 // Tests for standard TypedArray array iteration functions. | 5 // Tests for standard TypedArray array iteration functions. |
| 8 | 6 |
| 9 var typedArrayConstructors = [ | 7 var typedArrayConstructors = [ |
| 10 Uint8Array, | 8 Uint8Array, |
| 11 Int8Array, | 9 Int8Array, |
| 12 Uint16Array, | 10 Uint16Array, |
| 13 Int16Array, | 11 Int16Array, |
| 14 Uint32Array, | 12 Uint32Array, |
| 15 Int32Array, | 13 Int32Array, |
| 16 Uint8ClampedArray, | 14 Uint8ClampedArray, |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 // Shadowing the length property doesn't change anything | 185 // Shadowing the length property doesn't change anything |
| 188 a = new constructor([1, 2]); | 186 a = new constructor([1, 2]); |
| 189 Object.defineProperty(a, 'length', { value: 1 }); | 187 Object.defineProperty(a, 'length', { value: 1 }); |
| 190 assertEquals(true, a.some(function(elt) { return elt == 2; })); | 188 assertEquals(true, a.some(function(elt) { return elt == 2; })); |
| 191 assertEquals(false, Array.prototype.some.call(a, function(elt) { | 189 assertEquals(false, Array.prototype.some.call(a, function(elt) { |
| 192 return elt == 2; | 190 return elt == 2; |
| 193 })); | 191 })); |
| 194 })(); | 192 })(); |
| 195 | 193 |
| 196 } | 194 } |
| OLD | NEW |