mirror of
https://github.com/tc39/test262.git
synced 2025-07-09 15:14:39 +02:00
* Fix bad references on tests for BigInt TypedArrays * Remove bad conversions for BigInt TypedArray * Cleanup the BigInt TypedArray harness file Remove non used code (testBigIntTypedArrayConversions) Move the constructors list to inside the exposed function, this prevents early implementations to fail before the function is called. * Fix bad references in TypedArrays.of (BigInt) * Remove BigInt tests from typedarray harness test * Use BigInt for BigInt typedArrays * Apply last fixings on BigInt TypedArray tests * Apply fixes to last revision from @anba
42 lines
984 B
JavaScript
42 lines
984 B
JavaScript
// Copyright (c) 2017 Rick Waldron. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
/*---
|
|
description: >
|
|
Including testTypedArray.js will expose:
|
|
|
|
var typedArrayConstructors = [ array of TypedArray constructors ]
|
|
var TypedArray
|
|
|
|
testWithTypedArrayConstructors()
|
|
testTypedArrayConversions()
|
|
|
|
includes: [testTypedArray.js,arrayContains.js]
|
|
features: [TypedArray]
|
|
---*/
|
|
var TAConstructors = [
|
|
Float64Array,
|
|
Float32Array,
|
|
Int32Array,
|
|
Int16Array,
|
|
Int8Array,
|
|
Uint32Array,
|
|
Uint16Array,
|
|
Uint8Array,
|
|
Uint8ClampedArray
|
|
];
|
|
|
|
var length = TAConstructors.length;
|
|
|
|
assert(
|
|
arrayContains(typedArrayConstructors, TAConstructors),
|
|
"All TypedArray constructors are accounted for"
|
|
);
|
|
assert(typeof TypedArray === "function");
|
|
assert.sameValue(TypedArray, Object.getPrototypeOf(Uint8Array));
|
|
|
|
|
|
var callCount = 0;
|
|
testWithTypedArrayConstructors(() => callCount++);
|
|
assert.sameValue(callCount, length);
|
|
|