summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/TypedArray/constructor-not-callable.js
blob: a3a2f8d1d547296a73bd1ae60eed0fa9b3da95c8 (plain)
1
2
3
4
5
6
7
8
9
10
for (var constructor of anyTypedArrayConstructors) {
    assertThrowsInstanceOf(() => constructor(), TypeError);
    assertThrowsInstanceOf(() => constructor(1), TypeError);
    assertThrowsInstanceOf(() => constructor.call(null), TypeError);
    assertThrowsInstanceOf(() => constructor.apply(null, []), TypeError);
    assertThrowsInstanceOf(() => Reflect.apply(constructor, null, []), TypeError);
}

if (typeof reportCompare === "function")
    reportCompare(true, true);