blob: f12ab051a1a75b3ad136119b9d40659ba422a34c [file] [log] [blame]
function assert(a) {
if (!a)
throw new Error("Bad assertion");
}
function assertThrowRangeError(input) {
try {
let number = 3;
number.toString(input);
assert(false);
} catch (e) {
assert(e instanceof RangeError);
}
}
assertThrowRangeError(1e100);
assertThrowRangeError(-1e101);