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