[ iOS ] TestWebKitAPI.ApplicationManifest.IconCoding is a constant failure
[WebKit-https.git] / JSTests / stress / number-prototype-to-string-cast-overflow.js
1 function assert(a) {
2     if (!a)
3         throw new Error("Bad assertion");
4 }
5
6 function assertThrowRangeError(input) {
7     try {
8         let number = 3;
9         number.toString(input);
10         assert(false);
11     } catch (e) {
12         assert(e instanceof RangeError);
13     }
14 }
15
16 assertThrowRangeError(1e100);
17 assertThrowRangeError(-1e101);
18