mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 23:44:27 +02:00
Separate cases
This commit is contained in:
parent
9e71e2120a
commit
97e051114a
22
src/async-functions/evaluation/async-arrow.template
Normal file
22
src/async-functions/evaluation/async-arrow.template
Normal file
@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/expressions/async-arrow-function/
|
||||
name: Async arrow function
|
||||
esid: prod-AsyncArrowFunction
|
||||
info: |
|
||||
Async Arrow Function Definitions
|
||||
|
||||
AsyncArrowFunction[In, Yield, Await]:
|
||||
async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] => AsyncConciseBody[?In]
|
||||
CoverCallExpressionAndAsyncArrowHead[?Yield, ?Await] [no LineTerminator here] => AsyncConciseBody[?In]
|
||||
|
||||
AsyncConciseBody[In]:
|
||||
{ AsyncFunctionBody }
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
async (/*{ params }*/) => {
|
||||
/*{ body }*/
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/statements/class/async-method/
|
||||
name: Async method as a ClassDeclaration element
|
||||
esid: prod-AsyncMethod
|
||||
info: |
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition :
|
||||
AsyncMethod
|
||||
|
||||
Async Function Definitions
|
||||
|
||||
AsyncMethod :
|
||||
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
class C {
|
||||
async method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let c = new C();
|
||||
let asyncFn = c.method.bind(c);
|
@ -0,0 +1,32 @@
|
||||
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/statements/class/elements/async-private-method/
|
||||
name: Async private method as a ClassDeclaration element
|
||||
esid: prod-AsyncMethod
|
||||
info: |
|
||||
ClassElement :
|
||||
PrivateMethodDefinition
|
||||
|
||||
MethodDefinition :
|
||||
AsyncMethod
|
||||
|
||||
Async Function Definitions
|
||||
|
||||
AsyncMethod :
|
||||
async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions, class-methods-private]
|
||||
---*/
|
||||
|
||||
class C {
|
||||
async #method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
async method(/*{ params }*/) {
|
||||
return this.#method(/*{ params }*/);
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let c = new C();
|
||||
let asyncFn = c.method.bind(c);
|
@ -0,0 +1,28 @@
|
||||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/statements/class/async-method-static/
|
||||
name: Static async method as a ClassDeclaration element
|
||||
esid: prod-AsyncMethod
|
||||
info: |
|
||||
ClassElement :
|
||||
static MethodDefinition
|
||||
|
||||
MethodDefinition :
|
||||
AsyncMethod
|
||||
|
||||
Async Function Definitions
|
||||
|
||||
AsyncMethod :
|
||||
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
class C {
|
||||
static async method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = C.method;
|
@ -0,0 +1,31 @@
|
||||
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/statements/class/elements/async-private-method-static/
|
||||
name: Static async private method as a ClassDeclaration element
|
||||
esid: prod-AsyncMethod
|
||||
info: |
|
||||
ClassElement :
|
||||
static PrivateMethodDefinition
|
||||
|
||||
MethodDefinition :
|
||||
AsyncMethod
|
||||
|
||||
Async Function Definitions
|
||||
|
||||
AsyncMethod :
|
||||
async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions, class-static-methods-private]
|
||||
---*/
|
||||
|
||||
class C {
|
||||
static async #method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
static async method(/*{ params }*/) {
|
||||
return this.#method(/*{ params }*/);
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = C.method.bind(C);
|
@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/expressions/class/async-method/
|
||||
name: Async method as a ClassExpression element
|
||||
esid: prod-AsyncMethod
|
||||
info: |
|
||||
ClassElement :
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition :
|
||||
AsyncMethod
|
||||
|
||||
Async Function Definitions
|
||||
|
||||
AsyncMethod :
|
||||
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
var C = class {
|
||||
async method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
};
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let c = new C();
|
||||
let asyncFn = c.method.bind(c);
|
@ -0,0 +1,32 @@
|
||||
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/expressions/class/elements/async-private-method/
|
||||
name: Async private method as a ClassExpression element
|
||||
esid: prod-AsyncMethod
|
||||
info: |
|
||||
ClassElement :
|
||||
PrivateMethodDefinition
|
||||
|
||||
MethodDefinition :
|
||||
AsyncMethod
|
||||
|
||||
Async Function Definitions
|
||||
|
||||
AsyncMethod :
|
||||
async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions, class-methods-private]
|
||||
---*/
|
||||
|
||||
var C = class {
|
||||
async #method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
async method(/*{ params }*/) {
|
||||
return this.#method(/*{ params }*/);
|
||||
}
|
||||
};
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let c = new C();
|
||||
let asyncFn = c.method.bind(c);
|
@ -0,0 +1,28 @@
|
||||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/expressions/class/async-method-static/
|
||||
name: Static async method as a ClassExpression element
|
||||
esid: prod-AsyncMethod
|
||||
info: |
|
||||
ClassElement :
|
||||
static MethodDefinition
|
||||
|
||||
MethodDefinition :
|
||||
AsyncMethod
|
||||
|
||||
Async Function Definitions
|
||||
|
||||
AsyncMethod :
|
||||
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
var C = class {
|
||||
static async method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
};
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = C.method;
|
@ -0,0 +1,31 @@
|
||||
// Copyright (C) 2018 Bloomberg LP. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/expressions/class/elements/async-private-method-static/
|
||||
name: Static private async method as a ClassExpression element
|
||||
esid: prod-AsyncMethod
|
||||
info: |
|
||||
ClassElement :
|
||||
static PrivateMethodDefinition
|
||||
|
||||
MethodDefinition :
|
||||
AsyncMethod
|
||||
|
||||
Async Function Definitions
|
||||
|
||||
AsyncMethod :
|
||||
async [no LineTerminator here] # PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions, class-static-methods-private]
|
||||
---*/
|
||||
|
||||
var C = class {
|
||||
static async #method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
static async method(/*{ params }*/) {
|
||||
return this.#method(/*{ params }*/);
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = C.method.bind(C);
|
18
src/async-functions/evaluation/async-declaration.template
Normal file
18
src/async-functions/evaluation/async-declaration.template
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/statements/async-function/
|
||||
name: Async function declaration
|
||||
esid: prod-AsyncFunctionDeclaration
|
||||
info: |
|
||||
Async Function Definitions
|
||||
|
||||
AsyncFunctionDeclaration:
|
||||
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
async function asyncFn(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/expressions/async-function/named-
|
||||
name: Named async function expression
|
||||
esid: prod-AsyncFunctionExpression
|
||||
info: |
|
||||
Async Function Definitions
|
||||
|
||||
AsyncFunctionExpression :
|
||||
async [no LineTerminator here] function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
var asyncFn = async function asyncFn(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
};
|
18
src/async-functions/evaluation/async-expression.template
Normal file
18
src/async-functions/evaluation/async-expression.template
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/expressions/async-function/
|
||||
name: Unnamed async function expression
|
||||
esid: prod-AsyncFunctionExpression
|
||||
info: |
|
||||
Async Function Definitions
|
||||
|
||||
AsyncFunctionExpression :
|
||||
async [no LineTerminator here] function ( FormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
var asyncFn = async function (/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
};
|
22
src/async-functions/evaluation/async-obj-method.template
Normal file
22
src/async-functions/evaluation/async-obj-method.template
Normal file
@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2017 André Bargull. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
path: language/expressions/object/method-definition/async-
|
||||
name: Async method
|
||||
esid: prod-AsyncMethod
|
||||
info: |
|
||||
Async Function Definitions
|
||||
|
||||
AsyncMethod :
|
||||
async [no LineTerminator here] PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
|
||||
features: [async-functions]
|
||||
---*/
|
||||
|
||||
var obj = {
|
||||
async method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
};
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = obj.method;
|
@ -6,10 +6,10 @@ esid: sec-async-arrow-function-definitions
|
||||
desc: >
|
||||
Async function returns an async function.
|
||||
templates:
|
||||
- syntax/async-class-*.template
|
||||
- syntax/async-declaration.template
|
||||
- syntax/async-expression-*.template
|
||||
- syntax/async-obj-method.template
|
||||
- evaluation/async-class-*.template
|
||||
- evaluation/async-declaration.template
|
||||
- evaluation/async-expression-*.template
|
||||
- evaluation/async-obj-method.template
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
|
@ -6,10 +6,10 @@ esid: sec-async-arrow-function-definitions
|
||||
desc: >
|
||||
Async function returns an async function.
|
||||
templates:
|
||||
- syntax/async-class-*.template
|
||||
- syntax/async-declaration.template
|
||||
- syntax/async-expression-*.template
|
||||
- syntax/async-obj-method.template
|
||||
- evaluation/async-class-*.template
|
||||
- evaluation/async-declaration.template
|
||||
- evaluation/async-expression-*.template
|
||||
- evaluation/async-obj-method.template
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
|
@ -6,10 +6,10 @@ esid: sec-async-arrow-function-definitions
|
||||
desc: >
|
||||
Async function returns an async function.
|
||||
templates:
|
||||
- syntax/async-class-*.template
|
||||
- syntax/async-declaration.template
|
||||
- syntax/async-expression-*.template
|
||||
- syntax/async-obj-method.template
|
||||
- evaluation/async-class-*.template
|
||||
- evaluation/async-declaration.template
|
||||
- evaluation/async-expression-*.template
|
||||
- evaluation/async-obj-method.template
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
|
@ -6,10 +6,10 @@ esid: sec-async-arrow-function-definitions
|
||||
desc: >
|
||||
Async function returns an async function.
|
||||
templates:
|
||||
- syntax/async-class-*.template
|
||||
- syntax/async-declaration.template
|
||||
- syntax/async-expression-*.template
|
||||
- syntax/async-obj-method.template
|
||||
- evaluation/async-class-*.template
|
||||
- evaluation/async-declaration.template
|
||||
- evaluation/async-expression-*.template
|
||||
- evaluation/async-obj-method.template
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
|
@ -6,10 +6,10 @@ esid: sec-async-arrow-function-definitions
|
||||
desc: >
|
||||
Async function returns an async function.
|
||||
templates:
|
||||
- syntax/async-class-*.template
|
||||
- syntax/async-declaration.template
|
||||
- syntax/async-expression-*.template
|
||||
- syntax/async-obj-method.template
|
||||
- evaluation/async-class-*.template
|
||||
- evaluation/async-declaration.template
|
||||
- evaluation/async-expression-*.template
|
||||
- evaluation/async-obj-method.template
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
|
@ -6,10 +6,10 @@ esid: sec-async-arrow-function-definitions
|
||||
desc: >
|
||||
Async function returns an async function.
|
||||
templates:
|
||||
- syntax/async-class-*.template
|
||||
- syntax/async-declaration.template
|
||||
- syntax/async-expression-*.template
|
||||
- syntax/async-obj-method.template
|
||||
- evaluation/async-class-*.template
|
||||
- evaluation/async-declaration.template
|
||||
- evaluation/async-expression-*.template
|
||||
- evaluation/async-obj-method.template
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
|
@ -24,6 +24,3 @@ class C {
|
||||
/*{ body }*/
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let c = new C();
|
||||
let asyncFn = c.method.bind(c);
|
||||
|
@ -23,10 +23,4 @@ class C {
|
||||
async #method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
async method(/*{ params }*/) {
|
||||
return this.#method(/*{ params }*/);
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let c = new C();
|
||||
let asyncFn = c.method.bind(c);
|
||||
|
@ -24,6 +24,4 @@ class C {
|
||||
/*{ body }*/
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = C.method;
|
||||
|
||||
|
@ -23,10 +23,6 @@ class C {
|
||||
static async #method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
static async method(/*{ params }*/) {
|
||||
return this.#method(/*{ params }*/);
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = C.method.bind(C);
|
||||
|
||||
|
||||
|
@ -24,7 +24,4 @@ var C = class {
|
||||
/*{ body }*/
|
||||
}
|
||||
};
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let c = new C();
|
||||
let asyncFn = c.method.bind(c);
|
||||
|
||||
|
@ -23,10 +23,4 @@ var C = class {
|
||||
async #method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
async method(/*{ params }*/) {
|
||||
return this.#method(/*{ params }*/);
|
||||
}
|
||||
};
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let c = new C();
|
||||
let asyncFn = c.method.bind(c);
|
||||
|
@ -24,5 +24,3 @@ var C = class {
|
||||
/*{ body }*/
|
||||
}
|
||||
};
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = C.method;
|
||||
|
@ -23,9 +23,4 @@ var C = class {
|
||||
static async #method(/*{ params }*/) {
|
||||
/*{ body }*/
|
||||
}
|
||||
static async method(/*{ params }*/) {
|
||||
return this.#method(/*{ params }*/);
|
||||
}
|
||||
}
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = C.method.bind(C);
|
||||
|
@ -18,5 +18,3 @@ var obj = {
|
||||
/*{ body }*/
|
||||
}
|
||||
};
|
||||
// Stores a reference `asyncFn` for case evaluation
|
||||
let asyncFn = obj.method;
|
||||
|
Loading…
x
Reference in New Issue
Block a user