blob: 49e4c8db0b241f29fd3c9f068651c932a955d68e [file] [log] [blame]
function shouldEqual(actual, expected) {
if (actual != expected) {
throw "ERROR: expect " + expected + ", actual " + actual;
}
}
function test() {
var exception;
try {
var a = [];
a.length = 0xffffff00;
var b = a.splice(0, 0x100000); // Undecided array
var args = [];
args.length = 4096;
args.fill(b);
b.concat.apply(b, args);
} catch (e) {
exception = e;
}
shouldEqual(exception, "RangeError: Length exceeded the maximum array length");
}
test();