blob: 0cbb7b7fec2c96fb53414b65eb3452268e1530f9 [file] [log] [blame] [edit]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
for (let i = 0; i < 30; i++) {
let array = Array.from({ length: 1024 * 1024 * 2 });
shouldBe(array.length, 1024 * 1024 * 2);
shouldBe(1 in array, true);
shouldBe(array[0], undefined);
shouldBe(array[1], undefined);
}