blob: 425baabd3452c375cc7e1ab1f8a70e5a62a30bfe [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 = 0x1fff00;
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();