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-cast-overflow.js
1 //@ runBigIntEnabled
2
3 function assert(a) {
4     if (!a)
5         throw new Error("Bad assertion");
6 }
7
8 function assertThrowRangeError(input) {
9     try {
10         let number = 3n;
11         number.toString(input);
12         assert(false);
13     } catch (e) {
14         assert(e instanceof RangeError);
15     }
16 }
17
18 assertThrowRangeError(1e100);
19 assertThrowRangeError(-1e101);
20