mirror of https://github.com/tc39/test262.git
[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:
parent
ef77548b1c
commit
f8c62a49fb
|
@ -1,4 +1,5 @@
|
|||
//@ runDefault
|
||||
//@ skip if $architecture == "x86"
|
||||
// This passes if it does not crash.
|
||||
new WebAssembly.CompileError({
|
||||
valueOf() {
|
||||
|
|
|
@ -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'.");
|
Loading…
Reference in New Issue