Skip to content
Snippets Groups Projects
Commit df2cb021 authored by test262-automation's avatar test262-automation Committed by Rick Waldron
Browse files

[v8-test262-automation] Changes from https://github.com/v8/v8.git at sha...

[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)
parent d52f621a
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
// 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}`);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment