[JSC] Do not use asArrayModes() with Structures because it discards TypedArray inform...
[WebKit-https.git] / JSTests / stress / big-int-prototype-to-string-apply.js
1 //@ runBigIntEnabled
2
3 function assert(a) {
4     if (!a)
5         throw new Error("Bad assertion");
6 }
7
8 function throwsTypeError(v) {
9     try {
10         BigInt.prototype.toString.apply(v);
11         assert(false);
12     } catch (e) {
13         assert(e instanceof TypeError);
14     }
15 }
16
17 throwsTypeError(3);
18 throwsTypeError(3.5);
19 throwsTypeError("ABC");
20 throwsTypeError(Symbol("test"));
21 throwsTypeError({});
22 throwsTypeError(true);
23 throwsTypeError([3n]);
24