blob: 2fd2777099f27331ef4c7874167e563ba986058c [file] [log] [blame]
//@ runBigIntEnabled
function assert(expected, value) {
if (expected !== value)
throw new Error("Bad assertion. Expected: " + expected + " and value was: " + value);
}
let arr = [];
for (let i = 0; i < 1000000; i++) {
arr[i] = BigInt(i.toString());
}
gc();
for (let i = 0; i < 1000000; i++) {
assert(i.toString(), arr[i].toString());
}