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