mirror of
https://github.com/tc39/test262.git
synced 2025-07-20 20:44:43 +02:00
parent
29c6f7028a
commit
c47b716e8d
@ -36,6 +36,9 @@ var bcv = {
|
||||
Uint32: [
|
||||
127,
|
||||
],
|
||||
Float16: [
|
||||
127,
|
||||
],
|
||||
Float32: [
|
||||
127,
|
||||
],
|
||||
|
@ -17,16 +17,23 @@ features: [TypedArray]
|
||||
assert(typeof TypedArray === "function");
|
||||
assert.sameValue(TypedArray, Object.getPrototypeOf(Uint8Array));
|
||||
|
||||
var hasFloat16Array = typeof Float16Array !== 'undefined';
|
||||
|
||||
var callCount = 0;
|
||||
testWithTypedArrayConstructors(() => callCount++);
|
||||
assert.sameValue(callCount, 9);
|
||||
assert.sameValue(callCount, 9 + hasFloat16Array);
|
||||
|
||||
assert.sameValue(typedArrayConstructors[0], Float64Array);
|
||||
assert.sameValue(typedArrayConstructors[1], Float32Array);
|
||||
assert.sameValue(typedArrayConstructors[2], Int32Array);
|
||||
assert.sameValue(typedArrayConstructors[3], Int16Array);
|
||||
assert.sameValue(typedArrayConstructors[4], Int8Array);
|
||||
assert.sameValue(typedArrayConstructors[5], Uint32Array);
|
||||
assert.sameValue(typedArrayConstructors[6], Uint16Array);
|
||||
assert.sameValue(typedArrayConstructors[7], Uint8Array);
|
||||
assert.sameValue(typedArrayConstructors[8], Uint8ClampedArray);
|
||||
var index = 0;
|
||||
|
||||
assert.sameValue(typedArrayConstructors[index++], Float64Array);
|
||||
assert.sameValue(typedArrayConstructors[index++], Float32Array);
|
||||
if (hasFloat16Array) {
|
||||
assert.sameValue(typedArrayConstructors[index++], Float16Array);
|
||||
}
|
||||
assert.sameValue(typedArrayConstructors[index++], Int32Array);
|
||||
assert.sameValue(typedArrayConstructors[index++], Int16Array);
|
||||
assert.sameValue(typedArrayConstructors[index++], Int8Array);
|
||||
assert.sameValue(typedArrayConstructors[index++], Uint32Array);
|
||||
assert.sameValue(typedArrayConstructors[index++], Uint16Array);
|
||||
assert.sameValue(typedArrayConstructors[index++], Uint8Array);
|
||||
assert.sameValue(typedArrayConstructors[index++], Uint8ClampedArray);
|
||||
|
Loading…
x
Reference in New Issue
Block a user