[javascriptcore-test262-automation] Changes from https://github.com/webkit/webkit.git at sha ce279990f8 on Wed Sep 05 2018 18:18:55 GMT+0000 (Coordinated Universal Time)

This commit is contained in:
test262-automation 2018-09-05 18:21:18 +00:00
parent ef77548b1c
commit f8c62a49fb
2 changed files with 19 additions and 0 deletions

View File

@ -1,4 +1,5 @@
//@ runDefault //@ runDefault
//@ skip if $architecture == "x86"
// This passes if it does not crash. // This passes if it does not crash.
new WebAssembly.CompileError({ new WebAssembly.CompileError({
valueOf() { valueOf() {

View File

@ -0,0 +1,18 @@
//@ runDefault
function assert(a, b) {
if (a != b)
throw "FAIL";
}
function test(script) {
try {
eval(script);
} catch (e) {
return e;
}
}
assert(test("class C1 { async constructor() { } }"), "SyntaxError: Cannot declare an async method named 'constructor'.");
assert(test("class C1 { *constructor() { } }"), "SyntaxError: Cannot declare a generator function named 'constructor'.");
assert(test("class C1 { async *constructor() { } }"), "SyntaxError: Cannot declare an async generator method named 'constructor'.");