| 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-array-includes | |
| 6 | |
| 7 // Largely ported from | 5 // Largely ported from |
| 8 // https://github.com/tc39/Array.prototype.includes/tree/master/test/built-ins/T
ypedArray/prototype/includes | 6 // https://github.com/tc39/Array.prototype.includes/tree/master/test/built-ins/T
ypedArray/prototype/includes |
| 9 // using https://www.npmjs.org/package/test262-to-mjsunit with further edits | 7 // using https://www.npmjs.org/package/test262-to-mjsunit with further edits |
| 10 | 8 |
| 11 | 9 |
| 12 function testTypedArrays(callback) { | 10 function testTypedArrays(callback) { |
| 13 [ | 11 [ |
| 14 Uint8Array, | 12 Uint8Array, |
| 15 Int8Array, | 13 Int8Array, |
| 16 Uint16Array, | 14 Uint16Array, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 assertTrue(new FloatArrayConstructor([1, 2, -0]).includes(+0)); | 192 assertTrue(new FloatArrayConstructor([1, 2, -0]).includes(+0)); |
| 195 assertTrue(new FloatArrayConstructor([1, 2, -0]).includes(-0)); | 193 assertTrue(new FloatArrayConstructor([1, 2, -0]).includes(-0)); |
| 196 assertTrue(new FloatArrayConstructor([1, 2, +0]).includes(-0)); | 194 assertTrue(new FloatArrayConstructor([1, 2, +0]).includes(-0)); |
| 197 assertTrue(new FloatArrayConstructor([1, 2, +0]).includes(+0)); | 195 assertTrue(new FloatArrayConstructor([1, 2, +0]).includes(+0)); |
| 198 assertFalse(new FloatArrayConstructor([1, 2, -Infinity]).includes(+Infinity)
); | 196 assertFalse(new FloatArrayConstructor([1, 2, -Infinity]).includes(+Infinity)
); |
| 199 assertTrue(new FloatArrayConstructor([1, 2, -Infinity]).includes(-Infinity))
; | 197 assertTrue(new FloatArrayConstructor([1, 2, -Infinity]).includes(-Infinity))
; |
| 200 assertFalse(new FloatArrayConstructor([1, 2, +Infinity]).includes(-Infinity)
); | 198 assertFalse(new FloatArrayConstructor([1, 2, +Infinity]).includes(-Infinity)
); |
| 201 assertTrue(new FloatArrayConstructor([1, 2, +Infinity]).includes(+Infinity))
; | 199 assertTrue(new FloatArrayConstructor([1, 2, +Infinity]).includes(+Infinity))
; |
| 202 }); | 200 }); |
| 203 })(); | 201 })(); |
| OLD | NEW |