blob: f26da4b31256c8793e6c30c5e70748ad9b748554 [file] [log] [blame]
function assert(a, e) {
if (a !== e)
throw new Error("Expected: " + e + " but got: " + a);
}
let n = 1000;
let arr = Array(n);
for(let i = 0; i < n; i++) {
arr[i] = eval(`() => ${i}`);
assert(arr[i](), i);
}
for(let i = 0; i < n; i++) {
assert(arr[i](), i);
}