blob: a9fa3023745ad7444e7271ad0086cf95fc5b6ca4 [file] [log] [blame]
//@ runBigIntEnabled
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);