Web Inspector: Make Console's Execution Context picker stand out when it is non-default
[WebKit-https.git] / JSTests / stress / big-int-prototype-to-string-wrong-values.js
1 //@ runBigIntEnabled
2
3 function assert(a) {
4     if (!a)
5         throw new Error("Bad assertion");
6 }
7
8 function assertRangeError(v) {
9     let a = 456n;
10     try {
11         a.toString(v);
12         assert(false);
13     } catch (e) {
14         assert(e instanceof RangeError);
15     }
16 }
17
18 assertRangeError(1);
19 assertRangeError(37);
20 assertRangeError(37.1);
21 assertRangeError(37.2);
22 assertRangeError(0);
23 assertRangeError(-1);
24 assertRangeError(1.999999);
25 assertRangeError(37.00000000000000001);
26 assertRangeError(NaN);
27 assertRangeError(null);
28 assertRangeError(+Infinity);
29 assertRangeError(-Infinity);
30 assertRangeError(-0);
31