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