[v8-test262-automation] Changes from https://github.com/v8/v8.git at sha bf5cc562 on Wed Nov 28 2018 19:07:54 GMT+0000 (Coordinated Universal Time)

This commit is contained in:
test262-automation 2018-11-28 19:08:28 +00:00
parent d52f621aba
commit 2f97eefb43
3 changed files with 16 additions and 1 deletions

View File

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This test gets very slow with slow asserts.
// Flags: --noenable-slow-asserts
try {
var a = 'a'.repeat(1 << 28);
} catch (e) {

View File

@ -0,0 +1,6 @@
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[] = [];
a => 0

View File

@ -19,7 +19,7 @@ let lastPromise = Promise.resolve();
function test(func, description) {
let maybeErr;
try { func({unreached_func: assert_unreached}); }
try { func({unreached_func: unreached_func}); }
catch(e) { maybeErr = e; }
if (typeof maybeErr !== 'undefined') {
console.log(`${description}: FAIL. ${maybeErr}`);
@ -98,6 +98,12 @@ function assert_array_equals(actual, expected, description) {
}
}
function unreached_func(msg) {
return function trap() {
assert_unreached(msg);
};
}
function assert_unreached(description) {
throw new Error(`unreachable:\n${description}`);
}