blob: e392eb79750d70716f684da186d1940f8f4dc5e0 [file] [log] [blame]
typedArrays = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
function assert(cond) {
if (!cond)
throw new Error("bad assertion!");
}
function foo() {
for (constructor of typedArrays) {
let a = new constructor(10);
let b = Object.getOwnPropertyDescriptor(a, 0);
assert(b.value === 0);
assert(b.writable === true);
assert(b.enumerable === true);
assert(b.configurable === true);
}
}
for (let i = 0; i < 100; i++)
foo();