diff --git a/harness/testBigIntTypedArray.js b/harness/testBigIntTypedArray.js index dc6d50f93b..f071e5515b 100644 --- a/harness/testBigIntTypedArray.js +++ b/harness/testBigIntTypedArray.js @@ -5,34 +5,26 @@ description: | Collection of functions used to assert the correctness of BigInt TypedArray objects. ---*/ -/** - * Array containing every typed array constructor. - */ -var BigIntTypedArrayConstructors = [ - BigInt64Array, - BigUint64Array -]; - /** * The %TypedArray% intrinsic constructor function. */ var TypedArray = Object.getPrototypeOf(Int8Array); -/** - * Callback for testing a typed array constructor. - * - * @callback typedArrayConstructorCallback - * @param {Function} Constructor the constructor object to test with. - */ - /** * Calls the provided function for every typed array constructor. * * @param {typedArrayConstructorCallback} f - the function to call for each typed array constructor. * @param {Array} selected - An optional Array with filtered typed arrays */ -function testWithBigIntTypedArrayConstructors(f, selected) { - var constructors = selected || BigIntTypedArrayConstructors; +function testWithBigIntTypedArrayConstructors(f) { + /** + * Array containing every BigInt typed array constructor. + */ + var constructors = [ + BigInt64Array, + BigUint64Array + ]; + for (var i = 0; i < constructors.length; ++i) { var constructor = constructors[i]; try { @@ -43,30 +35,3 @@ function testWithBigIntTypedArrayConstructors(f, selected) { } } } - -/** - * Helper for conversion operations on TypedArrays, the expected values - * properties are indexed in order to match the respective value for each - * TypedArray constructor - * @param {Function} fn - the function to call for each constructor and value. - * will be called with the constructor, value, expected - * value, and a initial value that can be used to avoid - * a false positive with an equivalent expected value. - */ -function testBigIntTypedArrayConversions(byteConversionValues, fn) { - var values = byteConversionValues.values; - var expected = byteConversionValues.expected; - - testWithBigIntTypedArrayConstructors(function(TA) { - var name = TA.name.slice(0, -5); - - return values.forEach(function(value, index) { - var exp = expected[name][index]; - var initial = 0; - if (exp === 0) { - initial = 1; - } - fn(TA, value, exp, initial); - }); - }); -} diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-operations-consistent-nan.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-operations-consistent-nan.js deleted file mode 100644 index 5db1cfcae3..0000000000 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-operations-consistent-nan.js +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.fill -description: Consistent canonicalization of NaN values -info: | - 22.2.3.8 %TypedArray%.prototype.fill (value [ , start [ , end ] ] ) - - %TypedArray%.prototype.fill is a distinct function that implements the same - algorithm as Array.prototype.fill as defined in 22.1.3.6 except that the this - object's [[ArrayLength]] internal slot is accessed in place of performing a - [[Get]] of "length". The implementation of the algorithm may be optimized with - the knowledge that the this value is an object that has a fixed length and - whose integer indexed properties are not sparse. However, such optimization - must not introduce any observable changes in the specified behaviour of the - algorithm. - - ... - - 22.1.3.6 Array.prototype.fill (value [ , start [ , end ] ] ) - - ... - 7. Repeat, while k < final - a. Let Pk be ! ToString(k). - b. Perform ? Set(O, Pk, value, true). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) - - ... - 8. If type is "Float32", then - a. Set rawBytes to a List containing the 4 bytes that are the result - of converting value to IEEE 754-2008 binary32 format using “Round to - nearest, ties to even” rounding mode. If isLittleEndian is false, the - bytes are arranged in big endian order. Otherwise, the bytes are - arranged in little endian order. If value is NaN, rawValue may be set - to any implementation chosen IEEE 754-2008 binary64 format Not-a-Number - encoding. An implementation must always choose the same encoding for - each implementation distinguishable NaN value. - 9. Else, if type is "Float64", then - a. Set rawBytes to a List containing the 8 bytes that are the IEEE - 754-2008 binary64 format encoding of value. If isLittleEndian is false, - the bytes are arranged in big endian order. Otherwise, the bytes are - arranged in little endian order. If value is NaN, rawValue may be set - to any implementation chosen IEEE 754-2008 binary32 format Not-a-Number - encoding. An implementation must always choose the same encoding for - each implementation distinguishable NaN value. - ... -includes: [nans.js, testBigIntTypedArray.js, compareArray.js] -features: [BigInt, TypedArray] ----*/ - -function body(FloatArray) { - var sample = new FloatArray(3); - var control, idx, someNaN, sampleBytes, controlBytes; - - for (idx = 0; idx < distinctNaNs.length; ++idx) { - someNaN = distinctNaNs[idx]; - control = new FloatArray([someNaN, someNaN, someNaN]); - - sample.fill(someNaN); - - sampleBytes = new Uint8Array(sample.buffer); - controlBytes = new Uint8Array(control.buffer); - assert(compareArray(sampleBytes, controlBytes), 'NaN value #' + idx); - } -} - -testWithBigIntTypedArrayConstructors(body, [Float32Array, Float64Array]); diff --git a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-operations.js b/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-operations.js deleted file mode 100644 index 676d18f86c..0000000000 --- a/test/built-ins/TypedArray/prototype/fill/BigInt/fill-values-conversion-operations.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.fill -description: > - Fills all the elements with non numeric values values. -info: | - 22.2.3.8 %TypedArray%.prototype.fill (value [ , start [ , end ] ] ) - - %TypedArray%.prototype.fill is a distinct function that implements the same - algorithm as Array.prototype.fill as defined in 22.1.3.6 except that the this - object's [[ArrayLength]] internal slot is accessed in place of performing a - [[Get]] of "length". The implementation of the algorithm may be optimized with - the knowledge that the this value is an object that has a fixed length and - whose integer indexed properties are not sparse. However, such optimization - must not introduce any observable changes in the specified behaviour of the - algorithm. - - ... - - 22.1.3.6 Array.prototype.fill (value [ , start [ , end ] ] ) - - ... - 7. Repeat, while k < final - a. Let Pk be ! ToString(k). - b. Perform ? Set(O, Pk, value, true). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) - - ... - 8. If type is "Float32", then - ... - 9. Else, if type is "Float64", then - ... - 10. Else, - ... - b. Let convOp be the abstract operation named in the Conversion Operation - column in Table 50 for Element Type type. - c. Let intValue be convOp(value). - d. If intValue ≥ 0, then - ... - e. Else, - ... -includes: [byteConversionValues.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testTypedArrayConversions(byteConversionValues, function(TA, value, expected, initial) { - var sample = new TA([initial]); - - sample.fill(value); - - assert.sameValue(sample[0], expected, value + " converts to " + expected); -}); diff --git a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js index 8ad970667d..fe301ac8f6 100644 --- a/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/filter/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -38,8 +38,8 @@ features: [BigInt, Symbol.species, TypedArray] testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA([40n]); - var otherTA = TA === Int8Array ? Int16Array : Int8Array; - var other = new otherTA([1, 0, 1]); + var otherTA = TA === BigInt64Array ? BigUint64Array : BigInt64Array; + var other = new otherTA([1n, 0n, 1n]); var result; sample.constructor = {}; @@ -50,5 +50,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { result = sample.filter(function() {}); assert.sameValue(result, other, "returned another typedarray"); - assert(compareArray(result, [1, 0, 1]), "the returned object is preserved"); + assert(compareArray(result, [1n, 0n, 1n]), "the returned object is preserved"); }); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-conversion-operation-consistent-nan.js b/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-conversion-operation-consistent-nan.js deleted file mode 100644 index 1b9534f1aa..0000000000 --- a/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-conversion-operation-consistent-nan.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.map -description: Consistent canonicalization of NaN values -info: | - 22.2.3.19 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] ) - - ... - 8. Repeat, while k < len - ... - d. Perform ? Set(A, Pk, mappedValue, true). - ... - - 9.4.5.9 IntegerIndexedElementSet ( O, index, value ) - - ... - 15. Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) - - ... - 8. If type is "Float32", then - a. Set rawBytes to a List containing the 4 bytes that are the result - of converting value to IEEE 754-2008 binary32 format using “Round to - nearest, ties to even” rounding mode. If isLittleEndian is false, the - bytes are arranged in big endian order. Otherwise, the bytes are - arranged in little endian order. If value is NaN, rawValue may be set - to any implementation chosen IEEE 754-2008 binary64 format Not-a-Number - encoding. An implementation must always choose the same encoding for - each implementation distinguishable NaN value. - 9. Else, if type is "Float64", then - a. Set rawBytes to a List containing the 8 bytes that are the IEEE - 754-2008 binary64 format encoding of value. If isLittleEndian is false, - the bytes are arranged in big endian order. Otherwise, the bytes are - arranged in little endian order. If value is NaN, rawValue may be set - to any implementation chosen IEEE 754-2008 binary32 format Not-a-Number - encoding. An implementation must always choose the same encoding for - each implementation distinguishable NaN value. - ... -includes: [nans.js, testBigIntTypedArray.js, compareArray.js] -features: [BigInt, TypedArray] ----*/ - -function body(FloatArray) { - var sample = new FloatArray(distinctNaNs); - var sampleBytes, resultBytes; - var i = 0; - - var result = sample.map(function() { - return distinctNaNs[i++]; - }); - - sampleBytes = new Uint8Array(sample.buffer); - resultBytes = new Uint8Array(result.buffer); - - assert(compareArray(sampleBytes, resultBytes)); -} - -testWithBigIntTypedArrayConstructors(body, [Float32Array, Float64Array]); diff --git a/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-conversion-operation.js b/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-conversion-operation.js deleted file mode 100644 index 6f2b83a637..0000000000 --- a/test/built-ins/TypedArray/prototype/map/BigInt/return-new-typedarray-conversion-operation.js +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-%typedarray%.prototype.map -description: > - Verify conversion values on returned instance -info: | - 22.2.3.19 %TypedArray%.prototype.map ( callbackfn [ , thisArg ] ) - - ... - 8. Repeat, while k < len - ... - d. Perform ? Set(A, Pk, mappedValue, true). - ... - - 9.4.5.9 IntegerIndexedElementSet ( O, index, value ) - - ... - 15. Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) - - ... - 8. If type is "Float32", then - ... - 9. Else, if type is "Float64", then - ... - 10. Else, - ... - b. Let convOp be the abstract operation named in the Conversion Operation - column in Table 50 for Element Type type. - c. Let intValue be convOp(value). - d. If intValue ≥ 0, then - ... - e. Else, - ... -includes: [byteConversionValues.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testTypedArrayConversions(byteConversionValues, function(TA, value, expected, initial) { - var sample = new TA([initial]); - - var result = sample.map(function() { - return value; - }); - - assert.sameValue(result[0], expected, value + " converts to " + expected); -}); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-conversions.js b/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-conversions.js deleted file mode 100644 index 78fd9dcbb1..0000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/array-arg-src-tonumber-value-conversions.js +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.set-array-offset -description: > - Values conversions on ToNumber(src property value) -info: | - 22.2.3.23.1 %TypedArray%.prototype.set (array [ , offset ] ) - - 1. Assert: array is any ECMAScript language value other than an Object with a - [[TypedArrayName]] internal slot. If it is such an Object, the definition in - 22.2.3.23.2 applies. - ... - 21. Repeat, while targetByteIndex < limit - a. Let Pk be ! ToString(k). - b. Let kNumber be ? ToNumber(? Get(src, Pk)). - c. If IsDetachedBuffer(targetBuffer) is true, throw a TypeError exception. - d. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, - kNumber). - ... -includes: [byteConversionValues.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testTypedArrayConversions(byteConversionValues, function(TA, value, expected, initial) { - var sample = new TA([initial]); - - sample.set([value]); - - assert.sameValue(sample[0], expected, "["+value+"] => ["+expected +"]"); -}); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/bit-precision.js b/test/built-ins/TypedArray/prototype/set/BigInt/bit-precision.js deleted file mode 100644 index 979b0b384f..0000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/bit-precision.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.set.2 -description: Preservation of bit-level encoding -info: | - [...] - 28. Else, - a. NOTE: If srcType and targetType are the same, the transfer must be - performed in a manner that preserves the bit-level encoding of the - source data. - b. Repeat, while targetByteIndex < limit - i. Let value be GetValueFromBuffer(srcBuffer, srcByteIndex, "Uint8"). - ii. Perform SetValueInBuffer(targetBuffer, targetByteIndex, "Uint8", - value). - iii. Set srcByteIndex to srcByteIndex + 1. - iv. Set targetByteIndex to targetByteIndex + 1. -includes: [nans.js, compareArray.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -function body(FloatArray) { - var source = new FloatArray(distinctNaNs); - var target = new FloatArray(distinctNaNs.length); - var sourceBytes, targetBytes; - - target.set(source); - - sourceBytes = new Uint8Array(source.buffer); - targetBytes = new Uint8Array(target.buffer); - - assert(compareArray(sourceBytes, targetBytes)) -} - -testWithBigIntTypedArrayConstructors(body, [Float32Array, Float64Array]); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-conversions-sab.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-conversions-sab.js deleted file mode 100644 index 7cf6f11111..0000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-conversions-sab.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// Copyright (C) 2017 Mozilla Corporation. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-%typedarray%.prototype.set-typedarray-offset -description: > - Set converted values from different buffer of different types and different type instances -includes: [byteConversionValues.js, testBigIntTypedArray.js] -features: [BigInt, SharedArrayBuffer] ----*/ - -testTypedArrayConversions(byteConversionValues, function(TA, value, expected, initial) { - if (TA === Float64Array || TA === Float32Array || TA === Uint8ClampedArray) { - return; - } - if (TA === Int32Array) { - return; - } - - var sab, src, target; - - sab = new SharedArrayBuffer(4); - src = new Int32Array(sab); - src[0] = value; - target = new TA([initial]); - - target.set(src); - - assert.sameValue(target[0], expected, "src is SAB-backed"); - - sab = new SharedArrayBuffer(4); - src = new Int32Array([value]); - target = new TA(sab); - target[0] = initial; - - target.set(src); - - assert.sameValue(target[0], expected, "target is SAB-backed"); - - var sab1 = new SharedArrayBuffer(4); - var sab2 = new SharedArrayBuffer(4); - src = new Int32Array(sab1); - src[0] = value; - target = new TA(sab2); - target[0] = initial; - - target.set(src); - - assert.sameValue(target[0], expected, "src and target are SAB-backed"); -}); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-conversions.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-conversions.js deleted file mode 100644 index fbb323f97d..0000000000 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-conversions.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.set-typedarray-offset -description: > - Set converted values from different buffer and different type instances -info: | - 22.2.3.23.2 %TypedArray%.prototype.set(typedArray [ , offset ] ) - - 1. Assert: typedArray has a [[TypedArrayName]] internal slot. If it does not, - the definition in 22.2.3.23.1 applies. - ... - 23. If SameValue(srcBuffer, targetBuffer) is true, then - ... - 24. Else, let srcByteIndex be srcByteOffset. - ... - 27. If SameValue(srcType, targetType) is true, then, - ... - 28. Else, - a. Repeat, while targetByteIndex < limit - i. Let value be GetValueFromBuffer(srcBuffer, srcByteIndex, srcType). - ii. Perform SetValueInBuffer(targetBuffer, targetByteIndex, targetType, - value). -includes: [byteConversionValues.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testTypedArrayConversions(byteConversionValues, function(TA, value, expected, initial) { - if (TA === Float64Array) { - return; - } - var src = new Float64Array([value]); - var target = new TA([initial]); - - target.set(src); - - assert.sameValue(target[0], expected); -}); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js index 408633ced3..344aceeda0 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js @@ -11,97 +11,93 @@ includes: [testBigIntTypedArray.js, compareArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; - testWithBigIntTypedArrayConstructors(function(TA) { - var other = Int32Array; - var sab = new SharedArrayBuffer(2 * other.BYTES_PER_ELEMENT); - var src = new other(sab); - src[0] = 42; - src[1] = 43; + var sab = new SharedArrayBuffer(2 * BigInt64Array.BYTES_PER_ELEMENT); + var src = new BigInt64Array(sab); + src[0] = 42n; + src[1] = 43n; var sample, result; - sample = new TA([1, 2, 3, 4]); + sample = new TA([1n, 2n, 3n, 4n]); result = sample.set(src, 0); - assert(compareArray(sample, [42, 43, 3, 4]), "src is SAB-backed, offset: 0, result: " + sample); + assert(compareArray(sample, [42n, 43n, 3n, 4n]), "src is SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA([1n, 2n, 3n, 4n]); result = sample.set(src, 1); - assert(compareArray(sample, [1, 42, 43, 4]), "src is SAB-backed, offset: 1, result: " + sample); + assert(compareArray(sample, [1n, 42n, 43n, 4n]), "src is SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA([1n, 2n, 3n, 4n]); result = sample.set(src, 2); - assert(compareArray(sample, [1, 2, 42, 43]), "src is SAB-backed, offset: 2, result: " + sample); + assert(compareArray(sample, [1n, 2n, 42n, 43n]), "src is SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - - src = new other([42, 43]); + src = new BigInt64Array([42n, 43n]); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 0); - assert(compareArray(sample, [42, 43, 3, 4]), "sample is SAB-backed, offset: 0, result: " + sample); + assert(compareArray(sample, [42n, 43n, 3n, 4n]), "sample is SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 1); - assert(compareArray(sample, [1, 42, 43, 4]), "sample is SAB-backed, offset: 1, result: " + sample); + assert(compareArray(sample, [1n, 42n, 43n, 4n]), "sample is SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 2); - assert(compareArray(sample, [1, 2, 42, 43]), "sample is SAB-backed, offset: 2, result: " + sample); + assert(compareArray(sample, [1n, 2n, 42n, 43n]), "sample is SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - var sab1 = new SharedArrayBuffer(2 * other.BYTES_PER_ELEMENT); - src = new other(sab1); - src[0] = 42; - src[1] = 43; + var sab1 = new SharedArrayBuffer(2 * BigInt64Array.BYTES_PER_ELEMENT); + src = new BigInt64Array(sab1); + src[0] = 42n; + src[1] = 43n; var sab2; sab2 = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab2); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 0); - assert(compareArray(sample, [42, 43, 3, 4]), "src and sample are SAB-backed, offset: 0, result: " + sample); + assert(compareArray(sample, [42n, 43n, 3n, 4n]), "src and sample are SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab2 = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab2); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 1); - assert(compareArray(sample, [1, 42, 43, 4]), "src and sample are SAB-backed, offset: 1, result: " + sample); + assert(compareArray(sample, [1n, 42n, 43n, 4n]), "src and sample are SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab2 = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab2); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 2); - assert(compareArray(sample, [1, 2, 42, 43]), "src and sample are SAB-backed, offset: 2, result: " + sample); + assert(compareArray(sample, [1n, 2n, 42n, 43n]), "src and sample are SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}, int_views); +}); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js index 6e1279ea4c..f179ba052c 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js @@ -10,98 +10,95 @@ includes: [testBigIntTypedArray.js, compareArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; - testWithBigIntTypedArrayConstructors(function(TA) { var sample, result; var sab = new SharedArrayBuffer(2 * TA.BYTES_PER_ELEMENT); var src = new TA(sab); - src[0] = 42; - src[1] = 43; + src[0] = 42n; + src[1] = 43n; - sample = new TA([1, 2, 3, 4]); + sample = new TA([1n, 2n, 3n, 4n]); result = sample.set(src, 1); - assert(compareArray(sample, [1, 42, 43, 4]), "src is SAB-backed, offset: 1, result: " + sample); + assert(compareArray(sample, [1n, 42n, 43n, 4n]), "src is SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA([1n, 2n, 3n, 4n]); result = sample.set(src, 0); - assert(compareArray(sample, [42, 43, 3, 4]), "src is SAB-backed, offset: 0, result: " + sample); + assert(compareArray(sample, [42n, 43n, 3n, 4n]), "src is SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - sample = new TA([1, 2, 3, 4]); + sample = new TA([1n, 2n, 3n, 4n]); result = sample.set(src, 2); - assert(compareArray(sample, [1, 2, 42, 43]), "src is SAB-backed, offset: 2, result: " + sample); + assert(compareArray(sample, [1n, 2n, 42n, 43n]), "src is SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); - - src = new TA([42, 43]); + src = new TA([42n, 43n]); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 1); - assert(compareArray(sample, [1, 42, 43, 4]), "sample is SAB-backed, offset: 1, result: " + sample); + assert(compareArray(sample, [1n, 42n, 43n, 4n]), "sample is SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 0); - assert(compareArray(sample, [42, 43, 3, 4]), "sample is SAB-backed, offset: 0, result: " + sample); + assert(compareArray(sample, [42n, 43n, 3n, 4n]), "sample is SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 2); - assert(compareArray(sample, [1, 2, 42, 43]), "sample is SAB-backed, offset: 2, result: " + sample); + assert(compareArray(sample, [1n, 2n, 42n, 43n]), "sample is SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); var sab1 = new SharedArrayBuffer(2 * TA.BYTES_PER_ELEMENT); src = new TA(sab1); - src[0] = 42; - src[1] = 43; + src[0] = 42n; + src[1] = 43n; var sab2; sab2 = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab2); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 1); - assert(compareArray(sample, [1, 42, 43, 4]), "src and sample are SAB-backed, offset: 1, result: " + sample); + assert(compareArray(sample, [1n, 42n, 43n, 4n]), "src and sample are SAB-backed, offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab2 = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab2); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 0); - assert(compareArray(sample, [42, 43, 3, 4]), "src and sample are SAB-backed, offset: 0, result: " + sample); + assert(compareArray(sample, [42n, 43n, 3n, 4n]), "src and sample are SAB-backed, offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab2 = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab2); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; result = sample.set(src, 2); - assert(compareArray(sample, [1, 2, 42, 43]), "src and sample are SAB-backed, offset: 2, result: " + sample); + assert(compareArray(sample, [1n, 2n, 42n, 43n]), "src and sample are SAB-backed, offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}, int_views); +}); diff --git a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js index 86c686e3b2..7e60fba139 100644 --- a/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js +++ b/test/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js @@ -11,41 +11,39 @@ includes: [testBigIntTypedArray.js, compareArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; - testWithBigIntTypedArrayConstructors(function(TA) { var sample, src, result, sab; sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; src = new TA(sample.buffer, 0, 2); result = sample.set(src, 0); - assert(compareArray(sample, [1, 2, 3, 4]), "offset: 0, result: " + sample); + assert(compareArray(sample, [1n, 2n, 3n, 4n]), "offset: 0, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; src = new TA(sample.buffer, 0, 2); result = sample.set(src, 1); - assert(compareArray(sample, [1, 1, 2, 4]), "offset: 1, result: " + sample); + assert(compareArray(sample, [1n, 1n, 2n, 4n]), "offset: 1, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); sab = new SharedArrayBuffer(4 * TA.BYTES_PER_ELEMENT); sample = new TA(sab); - sample[0] = 1; - sample[1] = 2; - sample[2] = 3; - sample[3] = 4; + sample[0] = 1n; + sample[1] = 2n; + sample[2] = 3n; + sample[3] = 4n; src = new TA(sample.buffer, 0, 2); result = sample.set(src, 2); - assert(compareArray(sample, [1, 2, 1, 2]), "offset: 2, result: " + sample); + assert(compareArray(sample, [1n, 2n, 1n, 2n]), "offset: 2, result: " + sample); assert.sameValue(result, undefined, "returns undefined"); -}, int_views); +}); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/bit-precision.js b/test/built-ins/TypedArray/prototype/slice/BigInt/bit-precision.js deleted file mode 100644 index e275653317..0000000000 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/bit-precision.js +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.slice -description: Preservation of bit-level encoding -info: | - [...] - 15. Else if count > 0, then - [...] - e. NOTE: If srcType and targetType are the same, the transfer must be - performed in a manner that preserves the bit-level encoding of the - source data. - f. Let srcByteOffet be the value of O's [[ByteOffset]] internal slot. - g. Let targetByteIndex be A's [[ByteOffset]] internal slot. - h. Let srcByteIndex be (k × elementSize) + srcByteOffet. - i. Let limit be targetByteIndex + count × elementSize. - j. Repeat, while targetByteIndex < limit - i. Let value be GetValueFromBuffer(srcBuffer, srcByteIndex, "Uint8"). - ii. Perform SetValueInBuffer(targetBuffer, targetByteIndex, "Uint8", - value). - iii. Increase srcByteIndex by 1. - iv. Increase targetByteIndex by 1. -includes: [nans.js, compareArray.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -function body(FloatArray) { - var subject = new FloatArray(distinctNaNs); - var sliced, subjectBytes, slicedBytes; - - sliced = subject.slice(); - - subjectBytes = new Uint8Array(subject.buffer); - slicedBytes = new Uint8Array(sliced.buffer); - - assert(compareArray(subjectBytes, slicedBytes)); -} - -testWithBigIntTypedArrayConstructors(body, [Float32Array, Float64Array]); diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-other-targettype.js b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-other-targettype.js index 5dee0faf73..c81ad9ab89 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-other-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-custom-ctor-other-targettype.js @@ -27,7 +27,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample.constructor = {}; sample.constructor[Symbol.species] = function(count) { - var other = TA === Int8Array ? Int16Array : Int8Array; + var other = TA === BigInt64Array ? BigUint64Array : BigInt64Array; $DETACHBUFFER(sample.buffer); return new other(count); }; diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-other-targettype.js b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-other-targettype.js index adcd18b71e..851468f93f 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-other-targettype.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/detached-buffer-zero-count-custom-ctor-other-targettype.js @@ -27,7 +27,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { var sample, result, other; var ctor = {}; ctor[Symbol.species] = function(count) { - other = TA === Int8Array ? Int16Array : Int8Array; + other = TA === BigInt64Array ? BigUint64Array : BigInt64Array; $DETACHBUFFER(sample.buffer); return new other(count); }; diff --git a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js index 81be8cd76d..bfd0fff4f3 100644 --- a/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/slice/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -38,7 +38,7 @@ features: [BigInt, Symbol.species, TypedArray] testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA([40n]); - var other = new Int8Array([1, 0, 1]); + var other = new BigInt64Array([1n, 0n, 1n]); var result; sample.constructor = {}; @@ -49,5 +49,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { result = sample.slice(0, 0); assert.sameValue(result, other, "returned another typedarray"); - assert(compareArray(result, [1, 0, 1]), "the returned object is preserved"); + assert(compareArray(result, [1n, 0n, 1n]), "the returned object is preserved"); }); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values-nan.js b/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values-nan.js deleted file mode 100644 index 7a553b13ee..0000000000 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values-nan.js +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.prototype.sort -description: Sort values to numeric ascending order -info: | - 22.2.3.26 %TypedArray%.prototype.sort ( comparefn ) - - When the TypedArray SortCompare abstract operation is called with two - arguments x and y, the following steps are taken: - - ... - - NOTE: Because NaN always compares greater than any other value, NaN property - values always sort to the end of the result when comparefn is not provided. -includes: [testBigIntTypedArray.js, compareArray.js] -features: [BigInt, TypedArray] ----*/ - -testWithBigIntTypedArrayConstructors(function(TA) { - var sample; - - sample = new TA([2, NaN, NaN, 0, 1]).sort(); - assert.sameValue(sample[0], 0, "#1 [0]"); - assert.sameValue(sample[1], 1, "#1 [1]"); - assert.sameValue(sample[2], 2, "#1 [2]"); - assert.sameValue(sample[3], NaN, "#1 [3]"); - assert.sameValue(sample[4], NaN, "#1 [4]"); - - sample = new TA([3, NaN, NaN, Infinity, 0, -Infinity, 2]).sort(); - assert.sameValue(sample[0], -Infinity, "#2 [0]"); - assert.sameValue(sample[1], 0, "#2 [1]"); - assert.sameValue(sample[2], 2, "#2 [2]"); - assert.sameValue(sample[3], 3, "#2 [3]"); - assert.sameValue(sample[4], Infinity, "#2 [4]"); - assert.sameValue(sample[5], NaN, "#2 [5]"); - assert.sameValue(sample[6], NaN, "#2 [6]"); -}, [Float64Array, Float32Array]); diff --git a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js b/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js index 57b4915518..79b7e54691 100644 --- a/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js +++ b/test/built-ins/TypedArray/prototype/sort/BigInt/sorted-values.js @@ -25,29 +25,7 @@ testWithBigIntTypedArrayConstructors(function(TA) { sample = new TA([3n, 4n, 3n, 1n, 0n, 1n, 2n]).sort(); assert(compareArray(sample, [0n, 1n, 1n, 2n, 3n, 3n, 4n]), "repeating numbers"); - - sample = new TA([1n, 0n, -0n, 2n]).sort(); - assert(compareArray(sample, [0n, 0n, 1n, 2n]), "0s"); }); -testWithBigIntTypedArrayConstructors(function(TA) { - var sample = new TA([-4, 3, 4, -3, 2, -2, 1, 0]).sort(); - assert(compareArray(sample, [-4, -3, -2, 0, 1, 2, 3, 4]), "negative values"); -}, [Float64Array, Float32Array, Int8Array, Int16Array, Int32Array]); - -testWithBigIntTypedArrayConstructors(function(TA) { - var sample; - - sample = new TA([0.5, 0, 1.5, 1]).sort(); - assert(compareArray(sample, [0, 0.5, 1, 1.5]), "non integers"); - - sample = new TA([0.5, 0, 1.5, -0.5, -1, -1.5, 1]).sort(); - assert(compareArray(sample, [-1.5, -1, -0.5, 0, 0.5, 1, 1.5]), "non integers + negatives"); - - sample = new TA([1, 0, -0, 2]).sort(); - assert(compareArray(sample, [0, 0, 1, 2]), "0 and -0"); - - sample = new TA([3, 4, Infinity, -Infinity, 1, 2]).sort(); - assert(compareArray(sample, [-Infinity, 1, 2, 3, 4, Infinity]), "infinities"); - -}, [Float64Array, Float32Array]); +var sample = new BigInt64Array([-4n, 3n, 4n, -3n, 2n, -2n, 1n, 0n]).sort(); +assert(compareArray(sample, [-4n, -3n, -2n, 0n, 1n, 2n, 3n, 4n]), "negative values"); diff --git a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js index ee537263ac..0aa28e822a 100644 --- a/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js +++ b/test/built-ins/TypedArray/prototype/subarray/BigInt/speciesctor-get-species-custom-ctor-returns-another-instance.js @@ -37,7 +37,7 @@ features: [BigInt, Symbol.species, TypedArray] testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA([40n]); - var other = new Int8Array([1, 0, 1]); + var other = new BigInt64Array([1n, 0n, 1n]); var result; sample.constructor = {}; @@ -48,5 +48,5 @@ testWithBigIntTypedArrayConstructors(function(TA) { result = sample.subarray(0, 0); assert.sameValue(result, other, "returned another typedarray"); - assert(compareArray(result, [1, 0, 1]), "the returned object is preserved"); + assert(compareArray(result, [1n, 0n, 1n]), "the returned object is preserved"); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js index 2f86cd9c28..932cfb3c97 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js @@ -22,7 +22,7 @@ features: [BigInt, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(1); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { if (TA.BYTES_PER_ELEMENT === 1) { // Impossible to trigger this step here. return; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js index 67f3f88717..f5f71f3d2a 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size.js @@ -21,7 +21,7 @@ features: [BigInt, TypedArray] var buffer = new ArrayBuffer(1); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { if (TA.BYTES_PER_ELEMENT === 1) { // Impossible to trigger this step here. return; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js index 9c590f8595..bd376cb79c 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js @@ -22,7 +22,7 @@ features: [BigInt, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(8); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, -1); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-throws.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-throws.js index d0c70d6690..dfd6c4bc87 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-throws.js @@ -21,7 +21,7 @@ features: [BigInt, TypedArray] var buffer = new ArrayBuffer(8); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, -1); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js index bfae5fa4c1..777a933f07 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js @@ -17,7 +17,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TAConstructor) { +testWithBigIntTypedArrayConstructors(function(TAConstructor) { var typedArray = new TAConstructor(new SharedArrayBuffer(8), -0); assert.sameValue(typedArray.byteOffset, +0); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-zero.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-zero.js index 14cca25849..4daa6aee12 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-zero.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-negative-zero.js @@ -17,7 +17,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TAConstructor) { +testWithBigIntTypedArrayConstructors(function(TAConstructor) { var typedArray = new TAConstructor(new ArrayBuffer(8), -0); assert.sameValue(typedArray.byteOffset, +0); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js index cef10b6984..82cbc1ab94 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js @@ -22,7 +22,7 @@ features: [BigInt, Symbol, SharedArrayBuffer, TypedArray] var byteOffset = Symbol("1"); var buffer = new SharedArrayBuffer(8); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, byteOffset); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws.js index a3c12fd016..cda2f9ae28 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws.js @@ -21,7 +21,7 @@ features: [BigInt, Symbol, TypedArray] var byteOffset = Symbol("1"); var buffer = new ArrayBuffer(8); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, byteOffset); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js index b70167e3b7..7e9b40e66a 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js @@ -21,7 +21,7 @@ features: [BigInt, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(8); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { if (TA.BYTES_PER_ELEMENT === 1) { // Impossible to trigger this step here. return; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js index 2a3a79303c..e511bc3945 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size.js @@ -20,7 +20,7 @@ features: [BigInt, TypedArray] var buffer = new ArrayBuffer(8); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { if (TA.BYTES_PER_ELEMENT === 1) { // Impossible to trigger this step here. return; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-detachbuffer.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-detachbuffer.js index 89430e6ab0..7c44a5389c 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-detachbuffer.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-detachbuffer.js @@ -13,7 +13,7 @@ includes: [testBigIntTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var offset = TA.BYTES_PER_ELEMENT; var buffer = new ArrayBuffer(3 * offset); var byteOffset = { valueOf() { $DETACHBUFFER(buffer); return offset; } }; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.js index a80143c266..a79626847f 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.js @@ -26,7 +26,7 @@ var byteOffset = { } }; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, byteOffset); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-throws.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-throws.js index f30cc25843..19a6095cb3 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/byteoffset-to-number-throws.js @@ -25,7 +25,7 @@ var byteOffset = { } }; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, byteOffset); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js index fbb038d257..f6ce2fdbcb 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js @@ -41,7 +41,7 @@ Object.defineProperty(newTarget, "prototype", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [buffer], newTarget); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/custom-proto-access-throws.js index 88c98eebf2..e30dc82f97 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/custom-proto-access-throws.js @@ -40,7 +40,7 @@ Object.defineProperty(newTarget, "prototype", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [buffer], newTarget); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js index 2f153de63d..0c86ffd725 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js @@ -15,7 +15,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var offset = TA.BYTES_PER_ELEMENT; var buffer = new SharedArrayBuffer(3 * offset); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-and-offset.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-and-offset.js index 7e27248f81..eb2b421877 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-and-offset.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-and-offset.js @@ -14,7 +14,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var offset = TA.BYTES_PER_ELEMENT; var buffer = new ArrayBuffer(3 * offset); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-sab.js index 9168589393..a47347e67f 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length-sab.js @@ -16,7 +16,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var length = 4; var buffer = new SharedArrayBuffer(bpe * length * 4); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length.js index 711aeb53a3..038c3e0baf 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-length.js @@ -15,7 +15,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var length = 4; var buffer = new ArrayBuffer(bpe * length * 4); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-negative-length-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-negative-length-sab.js index 2138f4a819..0a87ac3336 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-negative-length-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-negative-length-sab.js @@ -18,7 +18,7 @@ features: [BigInt, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(16); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, -1); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-negative-length.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-negative-length.js index f422a54d55..c4773ccaa2 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-negative-length.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-negative-length.js @@ -17,7 +17,7 @@ features: [BigInt, TypedArray] var buffer = new ArrayBuffer(16); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(buffer, 0, -1); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-offset-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-offset-sab.js index 8cf9c14fe3..28fa1938ef 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-offset-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-offset-sab.js @@ -15,7 +15,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer = new SharedArrayBuffer(bpe * 4); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-offset.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-offset.js index a8005eb0bb..1dc932cb4a 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-offset.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/defined-offset.js @@ -14,7 +14,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer = new ArrayBuffer(bpe * 4); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/detachedbuffer.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/detachedbuffer.js index 26cf08ae9c..3e01105b36 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/detachedbuffer.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/detachedbuffer.js @@ -13,7 +13,7 @@ includes: [testBigIntTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var offset = TA.BYTES_PER_ELEMENT; var buffer = new ArrayBuffer(3 * offset); $DETACHBUFFER(buffer); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-length-throws-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-length-throws-sab.js index 64d7264669..a324f6feb3 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-length-throws-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-length-throws-sab.js @@ -22,7 +22,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer = new SharedArrayBuffer(bpe); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-length-throws.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-length-throws.js index 1f2378625c..ed156f400f 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-length-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-length-throws.js @@ -21,7 +21,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer = new ArrayBuffer(bpe); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js index 2b78d79265..090afac5a0 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js @@ -22,7 +22,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer = new SharedArrayBuffer(bpe); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-offset-throws.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-offset-throws.js index 81454fba77..6e09a341b3 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-offset-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/excessive-offset-throws.js @@ -21,7 +21,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer = new ArrayBuffer(bpe); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js index 7b3b9c9e21..10f1c12faf 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js @@ -19,7 +19,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var buffer = new SharedArrayBuffer(4); assert.throws(TypeError, function() { TA(buffer); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js index 0301136c0b..c746dc1889 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget.js @@ -18,7 +18,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var buffer = new ArrayBuffer(4); assert.throws(TypeError, function() { TA(buffer); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/is-referenced-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/is-referenced-sab.js index bdff85d026..34efb070f7 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/is-referenced-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/is-referenced-sab.js @@ -19,7 +19,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer = new SharedArrayBuffer(bpe); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/is-referenced.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/is-referenced.js index 1b609117f2..720e871914 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/is-referenced.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/is-referenced.js @@ -18,7 +18,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer = new ArrayBuffer(bpe); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-access-throws-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-access-throws-sab.js index 7921015663..1e38324b34 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-access-throws-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-access-throws-sab.js @@ -27,7 +27,7 @@ var len = { } }; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, 0, len); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-access-throws.js index 373311d0c9..a618946fce 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-access-throws.js @@ -26,7 +26,7 @@ var len = { } }; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(buffer, 0, len); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js index d0619a3f89..10518511c5 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js @@ -23,7 +23,7 @@ features: [BigInt, Symbol, SharedArrayBuffer, TypedArray] var buffer = new SharedArrayBuffer(8); var s = Symbol("1"); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, 0, s); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-is-symbol-throws.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-is-symbol-throws.js index 978e01e7d8..a1d1e1340f 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-is-symbol-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-is-symbol-throws.js @@ -22,7 +22,7 @@ features: [BigInt, Symbol, TypedArray] var buffer = new ArrayBuffer(8); var s = Symbol("1"); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(buffer, 0, s); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-to-number-detachbuffer.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-to-number-detachbuffer.js index 9bf8105f0e..e7bc719de0 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-to-number-detachbuffer.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/length-to-number-detachbuffer.js @@ -13,7 +13,7 @@ includes: [testBigIntTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var offset = TA.BYTES_PER_ELEMENT; var buffer = new ArrayBuffer(3 * offset); var length = { valueOf() { $DETACHBUFFER(buffer); return 1; } }; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js index 5d59764243..b918f788f5 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js @@ -30,7 +30,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var buffer = new SharedArrayBuffer(8); var sample = new TA(buffer); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/new-instance-extensibility.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/new-instance-extensibility.js index 6f7c8b7f48..8ffd2d7e7a 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/new-instance-extensibility.js @@ -29,7 +29,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var buffer = new ArrayBuffer(8); var sample = new TA(buffer); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js index 86374357e3..f1394f9229 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js @@ -31,7 +31,7 @@ var other = $262.createRealm().global; var C = new other.Function(); C.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [new SharedArrayBuffer(8)], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/proto-from-ctor-realm.js index 8e5f4b12f2..787a8cc7f9 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/proto-from-ctor-realm.js @@ -30,7 +30,7 @@ var other = $262.createRealm().global; var C = new other.Function(); C.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [new ArrayBuffer(8)], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/returns-new-instance-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/returns-new-instance-sab.js index 4067b836f3..5b8d3e710f 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/returns-new-instance-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/returns-new-instance-sab.js @@ -15,7 +15,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer1 = new SharedArrayBuffer(bpe * 4); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/returns-new-instance.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/returns-new-instance.js index d6fb802b93..902aa2f23f 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/returns-new-instance.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/returns-new-instance.js @@ -14,7 +14,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var bpe = TA.BYTES_PER_ELEMENT; var buffer1 = new ArrayBuffer(bpe * 4); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-bytelength-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-bytelength-sab.js index 3a9d2490ef..af55dd163e 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-bytelength-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-bytelength-sab.js @@ -55,7 +55,7 @@ var items = [ [-0.99999, 0, "-0.99999"] ]; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { items.forEach(function(item) { var len = item[0]; var expected = item[1]; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-bytelength.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-bytelength.js index 8155a44795..589570da1c 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-bytelength.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-bytelength.js @@ -54,7 +54,7 @@ var items = [ [-0.99999, 0, "-0.99999"] ]; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { items.forEach(function(item) { var len = item[0]; var expected = item[1]; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js index e6085da480..fa65ca0da1 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js @@ -53,7 +53,7 @@ var items = [ [-0.99999, 0, "-0.99999"] ]; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { items.forEach(function(item) { var offset = item[0]; var expected = item[1]; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-byteoffset.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-byteoffset.js index 216f9cfdba..2832f78e9f 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-byteoffset.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/toindex-byteoffset.js @@ -52,7 +52,7 @@ var items = [ [-0.99999, 0, "-0.99999"] ]; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { items.forEach(function(item) { var offset = item[0]; var expected = item[1]; diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js index 6a25a0aa97..50ba4d0a96 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js @@ -10,14 +10,16 @@ includes: [testBigIntTypedArray.js] features: [BigInt, SharedArrayBuffer, TypedArray] ---*/ -var sab = new SharedArrayBuffer(4); -var int_views = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array]; +var sab = new SharedArrayBuffer(8); -testWithTypedArrayConstructors(function(View1) { +testWithBigIntTypedArrayConstructors(function(View1) { var ta1 = new View1(sab); - testWithTypedArrayConstructors(function(View2) { + testWithBigIntTypedArrayConstructors(function(View2) { var ta2 = new View2(ta1); - assert.sameValue(ta2.buffer.constructor, ArrayBuffer, - "TypedArray of SharedArrayBuffer-backed TypedArray is ArrayBuffer-backed"); - }, int_views); -}, int_views); + assert.sameValue( + ta2.buffer.constructor, + ArrayBuffer, + "TypedArray of SharedArrayBuffer-backed TypedArray is ArrayBuffer-backed" + ); + }); +}); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js index b14fd3c4fb..fca8656cd4 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js @@ -41,7 +41,7 @@ function newTarget() {} var proto = {}; newTarget.prototype = proto; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [buffer], newTarget); assert.sameValue(ta.constructor, Object); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-custom-proto-if-object.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-custom-proto-if-object.js index 0cbbb87f6b..6988535fd8 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-custom-proto-if-object.js @@ -40,7 +40,7 @@ function newTarget() {} var proto = {}; newTarget.prototype = proto; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [buffer], newTarget); assert.sameValue(ta.constructor, Object); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js index 9e7a519015..830edce72e 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js @@ -40,7 +40,7 @@ var buffer = new SharedArrayBuffer(8); function newTarget() {} newTarget.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [buffer], newTarget); assert.sameValue(ta.constructor, TA); diff --git a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js index 7e8a5770ab..88b6e23cfc 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object.js @@ -39,7 +39,7 @@ var buffer = new ArrayBuffer(8); function newTarget() {} newTarget.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [buffer], newTarget); assert.sameValue(ta.constructor, TA); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/custom-proto-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/custom-proto-access-throws.js index 3cc746cd1a..ba557d010e 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/custom-proto-access-throws.js @@ -36,7 +36,7 @@ Object.defineProperty(newTarget, "prototype", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [1], newTarget); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/init-zeros.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/init-zeros.js index 78d52f9aec..cb627ba2ef 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/init-zeros.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/init-zeros.js @@ -40,7 +40,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var subject = new TA(9); assert.sameValue(subject[0], 0n, 'index 0'); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-infinity-throws-rangeerror.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-infinity-throws-rangeerror.js index 4e1b50f26c..f42ee337e6 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-infinity-throws-rangeerror.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-infinity-throws-rangeerror.js @@ -20,7 +20,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(Infinity); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-negative-integer-throws-rangeerror.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-negative-integer-throws-rangeerror.js index 8c634fd7ba..eca3f8627b 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-negative-integer-throws-rangeerror.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-negative-integer-throws-rangeerror.js @@ -26,7 +26,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(-1); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-symbol-throws.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-symbol-throws.js index fd37677814..2c59839d1f 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-symbol-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/is-symbol-throws.js @@ -19,7 +19,7 @@ features: [BigInt, Symbol, TypedArray] var s = Symbol('1'); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(s); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/new-instance-extensibility.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/new-instance-extensibility.js index 740dff1f3a..094653dab8 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/new-instance-extensibility.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/new-instance-extensibility.js @@ -31,7 +31,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(4); assert(Object.isExtensible(sample)); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/proto-from-ctor-realm.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/proto-from-ctor-realm.js index 7df2943579..52c6aef32c 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/proto-from-ctor-realm.js @@ -29,7 +29,7 @@ var other = $262.createRealm().global; var C = new other.Function(); C.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [0], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/returns-object.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/returns-object.js index 09aa6d7d62..f5839c568e 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/returns-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/returns-object.js @@ -23,7 +23,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var typedArray = new TA(4); var length = typedArray.length; diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/toindex-length.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/toindex-length.js index 22c1bba4d4..cfdadc0b61 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/toindex-length.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/toindex-length.js @@ -35,7 +35,7 @@ var items = [ [-0.99999, 0, "-0.99999"] ]; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { items.forEach(function(item) { var len = item[0]; var expected = item[1]; diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/undefined-newtarget-throws.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/undefined-newtarget-throws.js index 347b0deb82..678e0f9cae 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/undefined-newtarget-throws.js @@ -17,7 +17,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA(0); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/use-custom-proto-if-object.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/use-custom-proto-if-object.js index 3386725594..5c1503217a 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/use-custom-proto-if-object.js @@ -36,7 +36,7 @@ function newTarget() {} var proto = {}; newTarget.prototype = proto; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [1], newTarget); assert.sameValue(ta.constructor, Object); diff --git a/test/built-ins/TypedArrays/ctors-bigint/length-arg/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrays/ctors-bigint/length-arg/use-default-proto-if-custom-proto-is-not-object.js index b5651d31f7..e852681687 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/length-arg/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/length-arg/use-default-proto-if-custom-proto-is-not-object.js @@ -35,7 +35,7 @@ features: [BigInt, TypedArray] function newTarget() {} newTarget.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [1], newTarget); assert.sameValue(ta.constructor, TA); diff --git a/test/built-ins/TypedArrays/ctors-bigint/no-args/custom-proto-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/no-args/custom-proto-access-throws.js index 20325c97c2..03987c5da6 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/no-args/custom-proto-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/no-args/custom-proto-access-throws.js @@ -36,7 +36,7 @@ Object.defineProperty(newTarget, "prototype", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [], newTarget); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/no-args/new-instance-extensibility.js b/test/built-ins/TypedArrays/ctors-bigint/no-args/new-instance-extensibility.js index 6fe9d47572..bc22f47eab 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/no-args/new-instance-extensibility.js +++ b/test/built-ins/TypedArrays/ctors-bigint/no-args/new-instance-extensibility.js @@ -31,7 +31,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); assert(Object.isExtensible(sample)); diff --git a/test/built-ins/TypedArrays/ctors-bigint/no-args/proto-from-ctor-realm.js b/test/built-ins/TypedArrays/ctors-bigint/no-args/proto-from-ctor-realm.js index 80460f1d41..a05f153950 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/no-args/proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrays/ctors-bigint/no-args/proto-from-ctor-realm.js @@ -29,7 +29,7 @@ var other = $262.createRealm().global; var C = new other.Function(); C.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); diff --git a/test/built-ins/TypedArrays/ctors-bigint/no-args/returns-object.js b/test/built-ins/TypedArrays/ctors-bigint/no-args/returns-object.js index 4751a27b17..01a6d57ca9 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/no-args/returns-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/no-args/returns-object.js @@ -23,7 +23,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var typedArray = new TA(); assert.sameValue(typedArray.length, 0); diff --git a/test/built-ins/TypedArrays/ctors-bigint/no-args/undefined-newtarget-throws.js b/test/built-ins/TypedArrays/ctors-bigint/no-args/undefined-newtarget-throws.js index c26e881c8a..15d70a0a60 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/no-args/undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/no-args/undefined-newtarget-throws.js @@ -16,7 +16,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA(); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/no-args/use-custom-proto-if-object.js b/test/built-ins/TypedArrays/ctors-bigint/no-args/use-custom-proto-if-object.js index 9d44c61255..27e5626918 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/no-args/use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/no-args/use-custom-proto-if-object.js @@ -36,7 +36,7 @@ function newTarget() {} var proto = {}; newTarget.prototype = proto; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [], newTarget); assert.sameValue(ta.constructor, Object); diff --git a/test/built-ins/TypedArrays/ctors-bigint/no-args/use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrays/ctors-bigint/no-args/use-default-proto-if-custom-proto-is-not-object.js index 339a4a757f..48e8e3004e 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/no-args/use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/no-args/use-default-proto-if-custom-proto-is-not-object.js @@ -35,7 +35,7 @@ features: [BigInt, TypedArray] function newTarget() {} newTarget.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [], newTarget); assert.sameValue(ta.constructor, TA); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-array-returns.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-array-returns.js index c9a6b06526..48cfaf7f2a 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-array-returns.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-array-returns.js @@ -16,7 +16,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var typedArray = new TA([7n, 42n]); assert.sameValue(typedArray.length, 2); assert.sameValue(typedArray[0], 7n); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-generator-iterable-returns.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-generator-iterable-returns.js index c7236d4ad7..b5df7bc983 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-generator-iterable-returns.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-as-generator-iterable-returns.js @@ -16,7 +16,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var obj = (function *() { yield 7n; yield 42n; })(); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-conversion-operation-consistent-nan.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-conversion-operation-consistent-nan.js deleted file mode 100644 index 8d94c090a8..0000000000 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-conversion-operation-consistent-nan.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-typedarray-object -description: Consistent canonicalization of NaN values -info: | - 22.2.4.4 TypedArray ( object ) - - This description applies only if the TypedArray function is called with at - least one argument and the Type of the first argument is Object and that - object does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] - internal slot. - - ... - 9. Repeat, while k < len - ... - c. Perform ? Set(O, Pk, kValue, true). - ... - - 9.4.5.9 IntegerIndexedElementSet ( O, index, value ) - - ... - 15. Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) - - ... - 8. If type is "Float32", then - a. Set rawBytes to a List containing the 4 bytes that are the result - of converting value to IEEE 754-2008 binary32 format using “Round to - nearest, ties to even” rounding mode. If isLittleEndian is false, the - bytes are arranged in big endian order. Otherwise, the bytes are - arranged in little endian order. If value is NaN, rawValue may be set - to any implementation chosen IEEE 754-2008 binary64 format Not-a-Number - encoding. An implementation must always choose the same encoding for - each implementation distinguishable NaN value. - 9. Else, if type is "Float64", then - a. Set rawBytes to a List containing the 8 bytes that are the IEEE - 754-2008 binary64 format encoding of value. If isLittleEndian is false, - the bytes are arranged in big endian order. Otherwise, the bytes are - arranged in little endian order. If value is NaN, rawValue may be set - to any implementation chosen IEEE 754-2008 binary32 format Not-a-Number - encoding. An implementation must always choose the same encoding for - each implementation distinguishable NaN value. - ... -includes: [nans.js, testBigIntTypedArray.js, compareArray.js] -features: [BigInt, TypedArray] ----*/ - -function body(FloatArray) { - var first = new FloatArray(distinctNaNs); - var second = new FloatArray(distinctNaNs); - var firstBytes = new Uint8Array(first.buffer); - var secondBytes = new Uint8Array(second.buffer); - - assert(compareArray(firstBytes, secondBytes)); -} - -testWithTypedArrayConstructors(body, [Float32Array, Float64Array]); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-conversion-operation.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-conversion-operation.js deleted file mode 100644 index f6cef9bc84..0000000000 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-conversion-operation.js +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-typedarray-object -description: > - Verify conversion values on returned instance -info: | - 22.2.4.4 TypedArray ( object ) - - This description applies only if the TypedArray function is called with at - least one argument and the Type of the first argument is Object and that - object does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] - internal slot. - - ... - 9. Repeat, while k < len - ... - c. Perform ? Set(O, Pk, kValue, true). - ... - - 9.4.5.9 IntegerIndexedElementSet ( O, index, value ) - - ... - 15. Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) - - ... - 8. If type is "Float32", then - ... - 9. Else, if type is "Float64", then - ... - 10. Else, - ... - b. Let convOp be the abstract operation named in the Conversion Operation - column in Table 50 for Element Type type. - c. Let intValue be convOp(value). - d. If intValue ≥ 0, then - ... - e. Else, - ... -includes: [byteConversionValues.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testTypedArrayConversions(byteConversionValues, function(TA, value, expected) { - var sample = new TA([value]); - - assert.sameValue(sample[0], expected, value + " converts to " + expected); -}); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-custom-proto-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-custom-proto-access-throws.js index 750e65dabb..ef668514d9 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-custom-proto-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-custom-proto-access-throws.js @@ -41,7 +41,7 @@ Object.defineProperty(newTarget, "prototype", { var o = {}; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [o], newTarget); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterating-throws.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterating-throws.js index 0575a9901b..bf3e5e3697 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterating-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterating-throws.js @@ -19,7 +19,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var obj = (function *() { yield 0; throw new Test262Error(); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterator-not-callable-throws.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterator-not-callable-throws.js index f51d37e49a..18d988ef1e 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterator-not-callable-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterator-not-callable-throws.js @@ -21,7 +21,7 @@ features: [BigInt, Symbol.iterator, TypedArray] var obj = function () {}; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { obj[Symbol.iterator] = {}; assert.throws(TypeError, function() { new TA(obj); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterator-throws.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterator-throws.js index 03e08ee246..7db332def6 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterator-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-iterator-throws.js @@ -27,7 +27,7 @@ Object.defineProperty(obj, Symbol.iterator, { } }); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-excessive-throws.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-excessive-throws.js index a0ff4e705c..d7fb7216eb 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-excessive-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-excessive-throws.js @@ -23,7 +23,7 @@ var obj = { length: Math.pow(2, 53) }; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(RangeError, function() { new TA(obj); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-is-symbol-throws.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-is-symbol-throws.js index 53976243e4..a41f8a01b5 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-is-symbol-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-is-symbol-throws.js @@ -23,7 +23,7 @@ var obj = { length: Symbol("1") }; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(obj); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-throws.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-throws.js index d3147dc4c0..6272147d49 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-length-throws.js @@ -27,7 +27,7 @@ Object.defineProperty(obj, "length", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { new TA(obj); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-new-instance-extensibility.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-new-instance-extensibility.js index 5537142779..7332f854da 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-new-instance-extensibility.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-new-instance-extensibility.js @@ -29,7 +29,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var obj = { "0": 0n, "1": 1n, diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-proto-from-ctor-realm.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-proto-from-ctor-realm.js index 3b3c5cb868..19315f593f 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-proto-from-ctor-realm.js @@ -30,7 +30,7 @@ var other = $262.createRealm().global; var C = new other.Function(); C.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [{}], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-from-property.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-from-property.js index 340d5da441..758bf286d5 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-from-property.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-from-property.js @@ -31,7 +31,7 @@ Object.defineProperty(obj, "2", { } }); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { obj[0] = 0n; obj[1] = 0n; assert.throws(Test262Error, function() { diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive-typeerror.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive-typeerror.js index 68d8c0f639..027ad4ba66 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive-typeerror.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive-typeerror.js @@ -54,7 +54,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.toPrimitive, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new Int8Array(1); var toPrimitive = 0; var valueOf = 0; diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive.js index f8fc44562a..9d84bee67e 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-to-primitive.js @@ -52,7 +52,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.toPrimitive, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new Int8Array(1); var toPrimitive = 0; var valueOf = 0; diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-tostring.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-tostring.js index 6ce9f8ca5c..58801c0b03 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-tostring.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-tostring.js @@ -64,7 +64,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new Int8Array(1); var valueOf = 0; var toString = 0; diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof-typeerror.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof-typeerror.js index c0f9e72699..90a587af7d 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof-typeerror.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof-typeerror.js @@ -65,7 +65,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new Int8Array(1); var valueOf = 0; var toString = 0; diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof.js index 6919d931a1..d5138d56eb 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-obj-valueof.js @@ -65,7 +65,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new Int8Array(1); var valueOf = 0; diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-property.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-property.js index b752780da9..626472c902 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-property.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-property.js @@ -31,7 +31,7 @@ var obj = { length: 4 }; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { obj[0] = 0n; obj[1] = 0n; assert.throws(Test262Error, function() { diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-symbol-property.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-symbol-property.js index 64de7b8c6d..0ca0cd6557 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-symbol-property.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-throws-setting-symbol-property.js @@ -27,7 +27,7 @@ var obj = { length: 4 }; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { new TA(obj); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-undefined-newtarget-throws.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-undefined-newtarget-throws.js index df5996746d..7892e3b867 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-undefined-newtarget-throws.js @@ -19,7 +19,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA({}); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-use-custom-proto-if-object.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-use-custom-proto-if-object.js index 1d688fac98..1a2ae7ccb7 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-use-custom-proto-if-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-use-custom-proto-if-object.js @@ -39,7 +39,7 @@ function newTarget() {} var proto = {}; newTarget.prototype = proto; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [], newTarget); assert.sameValue(ta.constructor, Object); diff --git a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-use-default-proto-if-custom-proto-is-not-object.js b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-use-default-proto-if-custom-proto-is-not-object.js index 5f8355d12a..a6f3a362ee 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-use-default-proto-if-custom-proto-is-not-object.js +++ b/test/built-ins/TypedArrays/ctors-bigint/object-arg/object-arg-use-default-proto-if-custom-proto-is-not-object.js @@ -39,7 +39,7 @@ function newTarget() {} newTarget.prototype = null; var o = []; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [o], newTarget); assert.sameValue(ta.constructor, TA); diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-custom-proto-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-custom-proto-access-throws.js index e77230e44b..ab89da0728 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-custom-proto-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-custom-proto-access-throws.js @@ -40,7 +40,7 @@ Object.defineProperty(newTarget, "prototype", { var sample = new Int8Array(); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(Test262Error, function() { Reflect.construct(TA, [sample], newTarget); }); diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-detached-when-species-retrieved-different-type.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-detached-when-species-retrieved-different-type.js index a3c275ef16..c5de19602e 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-detached-when-species-retrieved-different-type.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-detached-when-species-retrieved-different-type.js @@ -30,7 +30,7 @@ includes: [testBigIntTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray, Symbol.species] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var speciesCallCount = 0; var bufferConstructor = Object.defineProperty({}, Symbol.species, { get: function() { diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-detached-when-species-retrieved-same-type.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-detached-when-species-retrieved-same-type.js index 6a24fae75f..c4f45c49c7 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-detached-when-species-retrieved-same-type.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-detached-when-species-retrieved-same-type.js @@ -34,7 +34,7 @@ includes: [testBigIntTypedArray.js, detachArrayBuffer.js] features: [BigInt, TypedArray, Symbol.species] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var speciesCallCount = 0; var bufferConstructor = Object.defineProperty({}, Symbol.species, { get: function() { diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-new-instance-extensibility.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-new-instance-extensibility.js index 4483d6f3b7..5fbd869d62 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-new-instance-extensibility.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-new-instance-extensibility.js @@ -29,11 +29,11 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -var typedArraySample1 = new Int8Array(); -var typedArraySample2 = new Int8Array(); +var typedArraySample1 = new BigInt64Array(); +var typedArraySample2 = new BigInt64Array(); Object.preventExtensions(typedArraySample2); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample1 = new TA(typedArraySample1); assert(Object.isExtensible(sample1), "new instance is extensible"); diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-access-throws.js index 776a567138..686c020080 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-access-throws.js @@ -25,7 +25,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var OtherCtor = TA === Int8Array ? Int16Array : Int8Array; var sample = new OtherCtor(); diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-custom-species-proto-from-ctor-realm.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-custom-species-proto-from-ctor-realm.js index 279dbf34b6..5a5d7ee0ab 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-custom-species-proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-custom-species-proto-from-ctor-realm.js @@ -37,15 +37,14 @@ includes: [testBigIntTypedArray.js] features: [BigInt, cross-realm, Symbol.species, TypedArray] ---*/ -var sample1 = new Int8Array(); -var sample2 = new Int16Array(); +var sample1 = new BigInt64Array(); +var sample2 = new BigUint64Array(); var other = $262.createRealm().global; var C = new other.Function(); C.prototype = null; - -testWithTypedArrayConstructors(function(TA) { - var sample = TA === Int8Array ? sample2 : sample1; +testWithBigIntTypedArrayConstructors(function(TA) { + var sample = TA === BigInt64Array ? sample2 : sample1; var ctor = {}; sample.buffer.constructor = ctor; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-custom-species.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-custom-species.js index f31427329e..1ff1e5db53 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-custom-species.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-custom-species.js @@ -29,11 +29,11 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -var sample1 = new Int8Array(); -var sample2 = new Int16Array(); +var sample1 = new BigInt64Array(); +var sample2 = new BigUint64Array(); -testWithTypedArrayConstructors(function(TA) { - var sample = TA === Int8Array ? sample2 : sample1; +testWithBigIntTypedArrayConstructors(function(TA) { + var sample = TA === BigInt64Array ? sample2 : sample1; var ctor = {}; var called = 0; var custom = {}; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-not-object-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-not-object-throws.js index d538503a39..435136a08a 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-not-object-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-not-object-throws.js @@ -30,7 +30,7 @@ features: [BigInt, Symbol, TypedArray] var sample1 = new Int8Array(); var sample2 = new Int16Array(); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = TA === Int8Array ? sample2 : sample1; sample.buffer.constructor = 1; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-access-throws.js index 0cf6e2965d..8b02063619 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-access-throws.js @@ -28,7 +28,7 @@ features: [BigInt, Symbol.species, TypedArray] var sample1 = new Int8Array(); var sample2 = new Int16Array(); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = TA === Int8Array ? sample2 : sample1; var ctor = {}; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-not-ctor-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-not-ctor-throws.js index 4419406c6d..338a63b20a 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-not-ctor-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-not-ctor-throws.js @@ -36,7 +36,7 @@ var ctor = function() { var m = { m() {} }.m; ctor[Symbol.species] = m; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = TA === Int8Array ? sample2 : sample1; sample.buffer.constructor = ctor; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-null.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-null.js index 34b3a12dfb..2eeb50e38b 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-null.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-null.js @@ -26,8 +26,8 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var OtherCtor = TA === Int8Array ? Int16Array : Int8Array; +testWithBigIntTypedArrayConstructors(function(TA) { + var OtherCtor = TA === BigInt64Array ? BigUint64Array : BigInt64Array; var sample = new OtherCtor(); var ctor = {}; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-prototype-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-prototype-throws.js index 16bfe8d874..dea4919af1 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-prototype-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-prototype-throws.js @@ -38,7 +38,7 @@ features: [BigInt, Symbol.species, TypedArray] var sample1 = new Int8Array(); var sample2 = new Int16Array(); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = TA === Int8Array ? sample2 : sample1; var ctor = {}; var called = 0; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-undefined.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-undefined.js index a6cfd230fb..9a265f1248 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-undefined.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-buffer-ctor-species-undefined.js @@ -26,8 +26,8 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { - var OtherCtor = TA === Int8Array ? Int16Array : Int8Array; +testWithBigIntTypedArrayConstructors(function(TA) { + var OtherCtor = TA === BigInt64Array ? BigUint64Array : BigInt64Array; var sample = new OtherCtor(); var ctor = {}; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js index abbabc666e..2c87901fd2 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-other-ctor-returns-new-typedarray.js @@ -19,7 +19,7 @@ var sample2 = new Int16Array(7); var sample3 = new BigInt64Array(7); var sample4 = new BigUint64Array(7); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = TA === Int8Array ? sample2 : TA === BigInt64Array ? sample4 : TA === BigUint64Array ? sample3 : sample1; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-proto-from-ctor-realm.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-proto-from-ctor-realm.js index 45acca5948..7e94985491 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-proto-from-ctor-realm.js @@ -30,7 +30,7 @@ var other = $262.createRealm().global; var C = new other.Function(); C.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ta = Reflect.construct(TA, [new TA()], C); assert.sameValue(Object.getPrototypeOf(ta), other[TA.name].prototype); diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-access-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-access-throws.js index c5d6639097..51fa9a8358 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-access-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-access-throws.js @@ -32,7 +32,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); Object.defineProperty(sample.buffer, "constructor", { get: function() { diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-custom-proto-from-ctor-realm.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-custom-proto-from-ctor-realm.js index ae21a381b4..90de964280 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-custom-proto-from-ctor-realm.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-custom-proto-from-ctor-realm.js @@ -53,7 +53,7 @@ var other = $262.createRealm().global; var C = new other.Function(); C.prototype = null; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); var ctor = {}; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-custom.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-custom.js index cac5edc53b..743b03e3f4 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-custom.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-custom.js @@ -40,7 +40,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); var ctor = {}; var called = 0; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-not-ctor.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-not-ctor.js index f8487280cc..32cbc01bc3 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-not-ctor.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-not-ctor.js @@ -34,7 +34,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); var ctor = {}; var m = { m() {} }; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-null.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-null.js index ff86f04d64..842ccd3d13 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-null.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-null.js @@ -33,7 +33,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(4); var ctor = {}; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-prototype-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-prototype-throws.js index 9de4e9b3bb..042d4213db 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-prototype-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-prototype-throws.js @@ -43,7 +43,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); var ctor = {}; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-throws.js index 36fdbe8daf..0aa7517b80 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-throws.js @@ -32,7 +32,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); var ctor = {}; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-undefined.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-undefined.js index f040fe16ee..251a396e85 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-undefined.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-species-undefined.js @@ -33,7 +33,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol.species, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(4); var ctor = {}; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-value-not-obj-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-value-not-obj-throws.js index 758eef5c0b..a3ca9a041b 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-value-not-obj-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-buffer-ctor-value-not-obj-throws.js @@ -34,7 +34,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, Symbol, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(); sample.buffer.constructor = 1; diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-returns-new-cloned-typedarray.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-returns-new-cloned-typedarray.js index 3321aa5b44..2176cebdb4 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-returns-new-cloned-typedarray.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-same-ctor-returns-new-cloned-typedarray.js @@ -20,7 +20,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA(7); var typedArray = new TA(sample); diff --git a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-undefined-newtarget-throws.js b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-undefined-newtarget-throws.js index de0e9fdc2c..82fd5c823a 100644 --- a/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-undefined-newtarget-throws.js +++ b/test/built-ins/TypedArrays/ctors-bigint/typedarray-arg/typedarray-arg-undefined-newtarget-throws.js @@ -18,7 +18,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var typedArray = new TA(4); assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArrays/from/BigInt/nan-conversion.js b/test/built-ins/TypedArrays/from/BigInt/nan-conversion.js deleted file mode 100644 index a318c055a3..0000000000 --- a/test/built-ins/TypedArrays/from/BigInt/nan-conversion.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.from -description: > - Test NaN conversions -info: | - 9.4.5.9 IntegerIndexedElementSet ( O, index, value ) - - ... - 3. Let numValue be ? ToNumber(value). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) -includes: [testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testWithBigIntTypedArrayConstructors(function(TA) { - var result = TA.from([NaN, undefined]); - assert.sameValue(result.length, 2); - assert.sameValue(result[0], NaN); - assert.sameValue(result[1], NaN); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Float32Array, - Float64Array -]); - -testWithBigIntTypedArrayConstructors(function(TA) { - var result = TA.from([NaN, undefined]); - assert.sameValue(result.length, 2); - assert.sameValue(result[0], 0); - assert.sameValue(result[1], 0); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Int8Array, - Int32Array, - Int16Array, - Int8Array, - Uint32Array, - Uint16Array, - Uint8Array, - Uint8ClampedArray -]); \ No newline at end of file diff --git a/test/built-ins/TypedArrays/from/BigInt/new-instance-from-ordinary-object.js b/test/built-ins/TypedArrays/from/BigInt/new-instance-from-ordinary-object.js index 22eff2856c..9573521b08 100644 --- a/test/built-ins/TypedArrays/from/BigInt/new-instance-from-ordinary-object.js +++ b/test/built-ins/TypedArrays/from/BigInt/new-instance-from-ordinary-object.js @@ -9,45 +9,17 @@ features: [BigInt, Array.prototype.values, TypedArray] ---*/ var source = { - "0": 42, - "2": 44, - length: 4 + "0": 42n, + "1": 44n, + length: 2 }; testWithBigIntTypedArrayConstructors(function(TA) { var result = TA.from(source); - assert.sameValue(result.length, 4); - assert.sameValue(result[0], 42); - assert.sameValue(result[1], NaN); - assert.sameValue(result[2], 44); - assert.sameValue(result[3], NaN); + assert.sameValue(result.length, 2); + assert.sameValue(result[0], 42n); + assert.sameValue(result[1], 44n); assert.sameValue(result.constructor, TA); assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Float32Array, - Float64Array -]); - -testWithBigIntTypedArrayConstructors(function(TA) { - var result = TA.from(source); - - assert.sameValue(result.length, 4); - assert.sameValue(result[0], 42); - assert.sameValue(result[1], 0); - assert.sameValue(result[2], 44); - assert.sameValue(result[3], 0); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Int8Array, - Int32Array, - Int16Array, - Int8Array, - Uint32Array, - Uint16Array, - Uint8Array, - Uint8ClampedArray -]); +}); diff --git a/test/built-ins/TypedArrays/from/BigInt/new-instance-from-sparse-array.js b/test/built-ins/TypedArrays/from/BigInt/new-instance-from-sparse-array.js index 361edb9d62..71e7d1c294 100644 --- a/test/built-ins/TypedArrays/from/BigInt/new-instance-from-sparse-array.js +++ b/test/built-ins/TypedArrays/from/BigInt/new-instance-from-sparse-array.js @@ -3,51 +3,15 @@ /*--- esid: sec-%typedarray%.from description: > - Return a new TypedArray from a sparse array + Throws a TypeError casting undefined value from sparse array to BigInt includes: [testBigIntTypedArray.js] -features: [BigInt, Array.prototype.values, TypedArray] +features: [BigInt, TypedArray] ---*/ -var source = [,,42,,44,,]; +var source = [,42n]; testWithBigIntTypedArrayConstructors(function(TA) { - var result = TA.from(source); - - assert.sameValue(result.length, 6); - assert.sameValue(result[0], NaN); - assert.sameValue(result[1], NaN); - assert.sameValue(result[2], 42); - assert.sameValue(result[3], NaN); - assert.sameValue(result[4], 44); - assert.sameValue(result[5], NaN); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Float32Array, - Float64Array -]); - -testWithBigIntTypedArrayConstructors(function(TA) { - var result = TA.from(source); - - assert.sameValue(result.length, 6); - assert.sameValue(result[0], 0); - assert.sameValue(result[1], 0); - assert.sameValue(result[2], 42); - assert.sameValue(result[3], 0); - assert.sameValue(result[4], 44); - assert.sameValue(result[5], 0); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Int8Array, - Int32Array, - Int16Array, - Int8Array, - Uint32Array, - Uint16Array, - Uint8Array, - Uint8ClampedArray -]); + assert.throws(TypeError, function() { + TA.from(source); + }); +}); diff --git a/test/built-ins/TypedArrays/from/BigInt/new-instance-from-zero.js b/test/built-ins/TypedArrays/from/BigInt/new-instance-from-zero.js deleted file mode 100644 index cbca4484d9..0000000000 --- a/test/built-ins/TypedArrays/from/BigInt/new-instance-from-zero.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.from -description: > - Return a new TypedArray using -0 and +0 -includes: [testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testWithBigIntTypedArrayConstructors(function(TA) { - var result = TA.from([-0, +0]); - assert.sameValue(result.length, 2); - assert.sameValue(result[0], -0, "-0 => -0"); - assert.sameValue(result[1], 0, "+0 => 0"); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Float32Array, - Float64Array -]); - -testWithBigIntTypedArrayConstructors(function(TA) { - var result = TA.from([-0, +0]); - assert.sameValue(result.length, 2); - assert.sameValue(result[0], 0, "-0 => 0"); - assert.sameValue(result[1], 0, "+0 => 0"); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Int16Array, - Int32Array, - Int8Array, - Uint16Array, - Uint32Array, - Uint8Array, - Uint8ClampedArray -]); \ No newline at end of file diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/conversion-operation.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/conversion-operation.js deleted file mode 100644 index 9fe931cfa4..0000000000 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/conversion-operation.js +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-integer-indexed-exotic-objects-defineownproperty-p-desc -description: > - Verify conversion after defining value -info: | - 9.4.5.3 [[DefineOwnProperty]] ( P, Desc) - - ... - 3. If Type(P) is String, then - ... - b. If numericIndex is not undefined, then - ... - xi. If Desc has a [[Value]] field, then - 1. Let value be Desc.[[Value]]. - 2. Return ? IntegerIndexedElementSet(O, intIndex, value). - ... - - 9.4.5.9 IntegerIndexedElementSet ( O, index, value ) - - ... - 15. Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) - - ... - 8. If type is "Float32", then - ... - 9. Else, if type is "Float64", then - ... - 10. Else, - ... - b. Let convOp be the abstract operation named in the Conversion Operation - column in Table 50 for Element Type type. - c. Let intValue be convOp(value). - d. If intValue ≥ 0, then - ... - e. Else, - ... -includes: [byteConversionValues.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testTypedArrayConversions(byteConversionValues, function(TA, value, expected, initial) { - var sample = new TA([initial]); - - Object.defineProperty(sample, "0", {value: value}); - - assert.sameValue(sample[0], expected, value + " converts to " + expected); -}); diff --git a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js index 26eb3526b2..d8f720d045 100644 --- a/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js +++ b/test/built-ins/TypedArrays/internals/DefineOwnProperty/BigInt/tonumber-value-detached-buffer.js @@ -30,14 +30,14 @@ features: [BigInt, Reflect, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { - var ta = new TA([17]); + var ta = new TA([17n]); var desc = { value: { valueOf: function() { $262.detachArrayBuffer(ta.buffer); - return 42; + return 42n; } } }; diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/conversion-operation.js b/test/built-ins/TypedArrays/internals/Set/BigInt/conversion-operation.js deleted file mode 100644 index 8f30a59a42..0000000000 --- a/test/built-ins/TypedArrays/internals/Set/BigInt/conversion-operation.js +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -esid: sec-integer-indexed-exotic-objects-set-p-v-receiver -description: > - Verify conversion after setting value -info: | - 9.4.5.5 [[Set]] ( P, V, Receiver) - - ... - 2. If Type(P) is String, then - ... - b. If numericIndex is not undefined, then - i. Return ? IntegerIndexedElementSet(O, numericIndex, V). - ... - - 9.4.5.9 IntegerIndexedElementSet ( O, index, value ) - - ... - 15. Perform SetValueInBuffer(buffer, indexedPosition, elementType, numValue). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) - - ... - 8. If type is "Float32", then - ... - 9. Else, if type is "Float64", then - ... - 10. Else, - ... - b. Let convOp be the abstract operation named in the Conversion Operation - column in Table 50 for Element Type type. - c. Let intValue be convOp(value). - d. If intValue ≥ 0, then - ... - e. Else, - ... -includes: [byteConversionValues.js, testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testTypedArrayConversions(byteConversionValues, function(TA, value, expected, initial) { - var sample = new TA([initial]); - - sample[0] = value; - - assert.sameValue(sample[0], expected, value + " converts to " + expected); -}); diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-minus-zero.js b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-minus-zero.js index e937c4d281..ad50456925 100644 --- a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-minus-zero.js +++ b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-minus-zero.js @@ -5,7 +5,7 @@ esid: sec-integer-indexed-exotic-objects-set-p-v-receiver description: > Returns false if index is -0 info: | - 9.4.5.5 [[Set]] ( P, V, Receiver) + [[Set]] ( P, V, Receiver) ... 2. If Type(P) is String, then @@ -14,11 +14,11 @@ info: | i. Return ? IntegerIndexedElementSet(O, numericIndex, V). ... - 9.4.5.9 IntegerIndexedElementSet ( O, index, value ) + IntegerIndexedElementSet ( O, index, value ) + 5. If arrayTypeName is "BigUint64Array" or "BigInt64Array", let numValue be ? ToBigInt(value). ... - 7. If index = -0, return false. - ... + 10. If index = -0, return false. includes: [testBigIntTypedArray.js] features: [BigInt, Reflect, TypedArray] ---*/ @@ -26,6 +26,6 @@ features: [BigInt, Reflect, TypedArray] testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA([42n]); - assert.sameValue(Reflect.set(sample, "-0", 1), false, "-0"); + assert.sameValue(Reflect.set(sample, "-0", 1n), false, "-0"); assert.sameValue(sample.hasOwnProperty("-0"), false, "has no property [-0]"); }); diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-integer.js b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-integer.js index 1d8e72b145..ef9723d345 100644 --- a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-integer.js +++ b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-not-integer.js @@ -26,8 +26,8 @@ features: [BigInt, Reflect, TypedArray] testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA([42n]); - assert.sameValue(Reflect.set(sample, "1.1", 1), false, "1.1"); - assert.sameValue(Reflect.set(sample, "0.0001", 1), false, "0.0001"); + assert.sameValue(Reflect.set(sample, "1.1", 1n), false, "1.1"); + assert.sameValue(Reflect.set(sample, "0.0001", 1n), false, "0.0001"); assert.sameValue(sample.hasOwnProperty("1.1"), false, "has no property [1.1]"); assert.sameValue( diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-out-of-bounds.js b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-out-of-bounds.js index a9a4d8b0ab..4de4518908 100644 --- a/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-out-of-bounds.js +++ b/test/built-ins/TypedArrays/internals/Set/BigInt/key-is-out-of-bounds.js @@ -27,9 +27,9 @@ features: [BigInt, Reflect, TypedArray] testWithBigIntTypedArrayConstructors(function(TA) { var sample = new TA([42n]); - assert.sameValue(Reflect.set(sample, "-1", 1), false, "-1"); - assert.sameValue(Reflect.set(sample, "1", 1), false, "1"); - assert.sameValue(Reflect.set(sample, "2", 1), false, "2"); + assert.sameValue(Reflect.set(sample, "-1", 1n), false, "-1"); + assert.sameValue(Reflect.set(sample, "1", 1n), false, "1"); + assert.sameValue(Reflect.set(sample, "2", 1n), false, "2"); assert.sameValue(sample.hasOwnProperty("-1"), false, "has no property [-1]"); assert.sameValue(sample.hasOwnProperty("1"), false, "has no property [1]"); diff --git a/test/built-ins/TypedArrays/internals/Set/BigInt/tonumber-value-detached-buffer.js b/test/built-ins/TypedArrays/internals/Set/BigInt/tonumber-value-detached-buffer.js index 2111ef6458..5794dfbc48 100644 --- a/test/built-ins/TypedArrays/internals/Set/BigInt/tonumber-value-detached-buffer.js +++ b/test/built-ins/TypedArrays/internals/Set/BigInt/tonumber-value-detached-buffer.js @@ -27,13 +27,13 @@ features: [BigInt, Reflect, TypedArray] ---*/ testWithBigIntTypedArrayConstructors(function(TA) { - var ta = new TA([17]); + var ta = new TA([17n]); assert.throws(TypeError, function() { Reflect.set(ta, 0, { valueOf: function() { $262.detachArrayBuffer(ta.buffer); - return 42; + return 42n; } }); }, diff --git a/test/built-ins/TypedArrays/of/BigInt/argument-is-symbol-throws.js b/test/built-ins/TypedArrays/of/BigInt/argument-is-symbol-throws.js index b593118495..70a7fb782a 100644 --- a/test/built-ins/TypedArrays/of/BigInt/argument-is-symbol-throws.js +++ b/test/built-ins/TypedArrays/of/BigInt/argument-is-symbol-throws.js @@ -16,7 +16,7 @@ features: [BigInt, Symbol, TypedArray] var s = Symbol("1"); -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { TA.of(s); }); diff --git a/test/built-ins/TypedArrays/of/BigInt/argument-number-value-throws.js b/test/built-ins/TypedArrays/of/BigInt/argument-number-value-throws.js index 16c8a9104a..01bf097b6a 100644 --- a/test/built-ins/TypedArrays/of/BigInt/argument-number-value-throws.js +++ b/test/built-ins/TypedArrays/of/BigInt/argument-number-value-throws.js @@ -16,7 +16,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var lastValue = false; var obj1 = { diff --git a/test/built-ins/TypedArrays/of/BigInt/custom-ctor-does-not-instantiate-ta-throws.js b/test/built-ins/TypedArrays/of/BigInt/custom-ctor-does-not-instantiate-ta-throws.js index ca17d437ed..9e7b97b73b 100644 --- a/test/built-ins/TypedArrays/of/BigInt/custom-ctor-does-not-instantiate-ta-throws.js +++ b/test/built-ins/TypedArrays/of/BigInt/custom-ctor-does-not-instantiate-ta-throws.js @@ -20,10 +20,10 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ctor = function() {}; assert.throws(TypeError, function() { - TA.of.call(ctor, 42); + TA.of.call(ctor, 42n); }); }); diff --git a/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-other-instance.js b/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-other-instance.js index 1454ab1c87..a2a61ce629 100644 --- a/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-other-instance.js +++ b/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-other-instance.js @@ -18,7 +18,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var result; var custom = new TA(3); var ctor = function() { diff --git a/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-smaller-instance-throws.js b/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-smaller-instance-throws.js index cddf2c4cf6..f174540ef0 100644 --- a/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-smaller-instance-throws.js +++ b/test/built-ins/TypedArrays/of/BigInt/custom-ctor-returns-smaller-instance-throws.js @@ -17,12 +17,12 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var ctor = function() { return new TA(1); }; assert.throws(TypeError, function() { - TypedArray.of.call(ctor, 1, 2); + TypedArray.of.call(ctor, 1n, 2n); }); }); diff --git a/test/built-ins/TypedArrays/of/BigInt/custom-ctor.js b/test/built-ins/TypedArrays/of/BigInt/custom-ctor.js index e087cada3b..cb770d55fe 100644 --- a/test/built-ins/TypedArrays/of/BigInt/custom-ctor.js +++ b/test/built-ins/TypedArrays/of/BigInt/custom-ctor.js @@ -20,7 +20,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var called = 0; var ctor = function() { called++; @@ -28,7 +28,7 @@ testWithTypedArrayConstructors(function(TA) { }; assert.throws(Test262Error, function() { - TA.of.call(ctor, 42); + TA.of.call(ctor, 42n); }); assert.sameValue(called, 1); diff --git a/test/built-ins/TypedArrays/of/BigInt/inherited.js b/test/built-ins/TypedArrays/of/BigInt/inherited.js index 677cb59fb4..71a3dc3d6c 100644 --- a/test/built-ins/TypedArrays/of/BigInt/inherited.js +++ b/test/built-ins/TypedArrays/of/BigInt/inherited.js @@ -13,7 +13,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.sameValue( TA.of, TypedArray.of, "method is inherited %TypedArray%.of" diff --git a/test/built-ins/TypedArrays/of/BigInt/invoked-as-func.js b/test/built-ins/TypedArrays/of/BigInt/invoked-as-func.js index 7becb0d7dc..98f6026836 100644 --- a/test/built-ins/TypedArrays/of/BigInt/invoked-as-func.js +++ b/test/built-ins/TypedArrays/of/BigInt/invoked-as-func.js @@ -16,7 +16,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var of = TA.of; assert.throws(TypeError, function() { diff --git a/test/built-ins/TypedArrays/of/BigInt/nan-conversion.js b/test/built-ins/TypedArrays/of/BigInt/nan-conversion.js deleted file mode 100644 index 4158c37090..0000000000 --- a/test/built-ins/TypedArrays/of/BigInt/nan-conversion.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.of -description: > - Test NaN conversions -info: | - 9.4.5.9 IntegerIndexedElementSet ( O, index, value ) - - ... - 3. Let numValue be ? ToNumber(value). - ... - - 24.1.1.6 SetValueInBuffer ( arrayBuffer, byteIndex, type, value [ , - isLittleEndian ] ) -includes: [testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testWithTypedArrayConstructors(function(TA) { - var result = TA.of(NaN, undefined); - assert.sameValue(result.length, 2); - assert.sameValue(result[0], NaN); - assert.sameValue(result[1], NaN); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Float32Array, - Float64Array -]); - -testWithTypedArrayConstructors(function(TA) { - var result = TA.of(NaN, undefined); - assert.sameValue(result.length, 2); - assert.sameValue(result[0], 0); - assert.sameValue(result[1], 0); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Int8Array, - Int32Array, - Int16Array, - Int8Array, - Uint32Array, - Uint16Array, - Uint8Array, - Uint8ClampedArray -]); diff --git a/test/built-ins/TypedArrays/of/BigInt/new-instance-empty.js b/test/built-ins/TypedArrays/of/BigInt/new-instance-empty.js index 1891ae1999..592f3ced35 100644 --- a/test/built-ins/TypedArrays/of/BigInt/new-instance-empty.js +++ b/test/built-ins/TypedArrays/of/BigInt/new-instance-empty.js @@ -8,7 +8,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var result = TA.of(); assert.sameValue(result.length, 0); assert.sameValue(result.constructor, TA); diff --git a/test/built-ins/TypedArrays/of/BigInt/new-instance-from-zero.js b/test/built-ins/TypedArrays/of/BigInt/new-instance-from-zero.js deleted file mode 100644 index 973753857f..0000000000 --- a/test/built-ins/TypedArrays/of/BigInt/new-instance-from-zero.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -esid: sec-%typedarray%.of -description: > - Return a new TypedArray using -0 and +0 values -includes: [testBigIntTypedArray.js] -features: [BigInt, TypedArray] ----*/ - -testWithTypedArrayConstructors(function(TA) { - var result = TA.of(-0, +0); - assert.sameValue(result.length, 2); - assert.sameValue(result[0], -0, "-0 => 0"); - assert.sameValue(result[1], 0, "+0 => 0"); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Float32Array, - Float64Array -]); - -testWithTypedArrayConstructors(function(TA) { - var result = TA.of(-0, +0); - assert.sameValue(result.length, 2); - assert.sameValue(result[0], 0, "-0 => 0"); - assert.sameValue(result[1], 0, "+0 => 0"); - assert.sameValue(result.constructor, TA); - assert.sameValue(Object.getPrototypeOf(result), TA.prototype); -}, -[ - Int16Array, - Int32Array, - Int8Array, - Uint16Array, - Uint32Array, - Uint8Array, - Uint8ClampedArray -]); diff --git a/test/built-ins/TypedArrays/of/BigInt/new-instance-using-custom-ctor.js b/test/built-ins/TypedArrays/of/BigInt/new-instance-using-custom-ctor.js index ec64f6fc64..ff9b68a7ad 100644 --- a/test/built-ins/TypedArrays/of/BigInt/new-instance-using-custom-ctor.js +++ b/test/built-ins/TypedArrays/of/BigInt/new-instance-using-custom-ctor.js @@ -8,7 +8,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var called = 0; var ctor = function(len) { diff --git a/test/built-ins/TypedArrays/of/BigInt/new-instance.js b/test/built-ins/TypedArrays/of/BigInt/new-instance.js index e71afc1b08..0e32755cf8 100644 --- a/test/built-ins/TypedArrays/of/BigInt/new-instance.js +++ b/test/built-ins/TypedArrays/of/BigInt/new-instance.js @@ -23,7 +23,7 @@ includes: [testBigIntTypedArray.js] features: [BigInt, TypedArray] ---*/ -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { var result = TA.of(42n, 43n, 0n); assert.sameValue(result.length, 3); assert.sameValue(result[0], 42n); diff --git a/test/built-ins/TypedArrays/of/BigInt/this-is-not-constructor.js b/test/built-ins/TypedArrays/of/BigInt/this-is-not-constructor.js index 006b674047..1811c1a750 100644 --- a/test/built-ins/TypedArrays/of/BigInt/this-is-not-constructor.js +++ b/test/built-ins/TypedArrays/of/BigInt/this-is-not-constructor.js @@ -17,8 +17,8 @@ features: [BigInt, TypedArray] var m = { m() {} }.m; -testWithTypedArrayConstructors(function(TA) { +testWithBigIntTypedArrayConstructors(function(TA) { assert.throws(TypeError, function() { - TA.of.call(m, []); + TA.of.call(m, 0n); }); }); diff --git a/test/harness/testTypedArray.js b/test/harness/testTypedArray.js index bb00168573..9c99a05a1e 100644 --- a/test/harness/testTypedArray.js +++ b/test/harness/testTypedArray.js @@ -25,11 +25,6 @@ var TAConstructors = [ Uint8ClampedArray ]; -if (typeof BigInt !== "undefined") { - TAConstructors.push(BigInt64Array); - TAConstructors.push(BigUint64Array); -} - var length = TAConstructors.length; assert(