mirror of
https://github.com/tc39/test262.git
synced 2025-05-03 22:40:28 +02:00
* [javascriptcore-test262-automation] changes from git@github.com:WebKit/webkit.git at sha 949e26452cfa153a7f4afe593da97e2fe9e1b706 on Tue Jul 03 2018 14:35:15 GMT-0400 (Eastern Daylight Time)
26 lines
629 B
JavaScript
26 lines
629 B
JavaScript
//@ if $buildType == "debug" && !$memoryLimited then runDefault("--maxSingleAllocationSize=1048576") else skip end
|
|
|
|
var exception;
|
|
|
|
function foo() { };
|
|
|
|
function test(length) {
|
|
try {
|
|
foo([...new Array(length)].filter(() => { }));
|
|
} catch (e) {
|
|
exception = e;
|
|
}
|
|
|
|
if (exception && exception != "Error: Out of memory")
|
|
throw "ERROR: length " + length + ": unexpected exception " + exception;
|
|
}
|
|
|
|
var sizes = [
|
|
1, 10, 50, 100, 500, 1000, 5000, 10000, 50000, 100000, 500000,
|
|
1000000, 5000000, 10000000, 50000000, 100000000, 500000000, 1000000000
|
|
];
|
|
|
|
for (size of sizes)
|
|
test(size);
|
|
|