mirror of https://github.com/tc39/test262.git
[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:
parent
d52f621aba
commit
2f97eefb43
|
@ -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) {
|
||||
|
|
|
@ -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
|
|
@ -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}`);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue