mirror of https://github.com/tc39/test262.git
built-ins/AsyncFunction/*: make all indentation consistent (depth & character)
This commit is contained in:
parent
66eaf57f88
commit
8342824894
|
@ -9,7 +9,7 @@ description: >
|
|||
similarly to functions.
|
||||
---*/
|
||||
|
||||
var AsyncFunction = async function foo() { }.constructor;
|
||||
var AsyncFunction = async function foo() {}.constructor;
|
||||
var fn;
|
||||
|
||||
fn = AsyncFunction("a", "await 1;");
|
||||
|
|
|
@ -8,6 +8,6 @@ description: >
|
|||
%AsyncFunction% is extensible
|
||||
---*/
|
||||
|
||||
var AsyncFunction = async function() { }.constructor;
|
||||
var AsyncFunction = async function() {}.constructor;
|
||||
AsyncFunction.x = 1;
|
||||
assert.sameValue(AsyncFunction.x, 1);
|
||||
|
|
|
@ -7,9 +7,8 @@ esid: sec-async-function-constructor
|
|||
description: >
|
||||
%AsyncFunction% is a subclass of Function
|
||||
---*/
|
||||
async function foo() { };
|
||||
async function foo() {};
|
||||
var AsyncFunction = foo.constructor;
|
||||
assert.sameValue(Object.getPrototypeOf(AsyncFunction), Function, "Prototype of constructor is Function");
|
||||
assert.sameValue(Object.getPrototypeOf(AsyncFunction.prototype), Function.prototype, "Prototype of constructor's prototype is Function.prototype");
|
||||
assert(foo instanceof Function, 'async function instance is instanceof Function');
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ description: >
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var AsyncFunction = async function foo() { }.constructor;
|
||||
var AsyncFunction = async function foo() {}.constructor;
|
||||
assert.sameValue(AsyncFunction.length, 1);
|
||||
verifyNotWritable(AsyncFunction, 'length');
|
||||
verifyNotEnumerable(AsyncFunction, 'length');
|
||||
|
|
|
@ -9,7 +9,7 @@ description: >
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var AsyncFunction = async function foo() { }.constructor;
|
||||
var AsyncFunction = async function foo() {}.constructor;
|
||||
assert.sameValue(AsyncFunction.name, "AsyncFunction");
|
||||
verifyNotWritable(AsyncFunction, "name");
|
||||
verifyNotEnumerable(AsyncFunction, "name");
|
||||
|
|
|
@ -8,7 +8,7 @@ description: AsyncFunction has a prototype property with writable false, enumera
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
var AsyncFunction = async function foo() { }.constructor;
|
||||
var AsyncFunction = async function foo() {}.constructor;
|
||||
verifyNotConfigurable(AsyncFunction, 'prototype');
|
||||
verifyNotWritable(AsyncFunction, 'prototype');
|
||||
verifyNotEnumerable(AsyncFunction, 'prototype');
|
||||
|
|
|
@ -8,5 +8,5 @@ description: >
|
|||
%AsyncFunction% exists and is a function
|
||||
---*/
|
||||
|
||||
var AsyncFunction = async function foo() { }.constructor;
|
||||
var AsyncFunction = async function foo() {}.constructor;
|
||||
assert.sameValue(typeof AsyncFunction, "function");
|
||||
|
|
|
@ -8,7 +8,6 @@ description: >
|
|||
%AsyncFunctionPrototype% has a [[Extensible]] of true
|
||||
---*/
|
||||
|
||||
var AsyncFunction = async function foo() { }.constructor;
|
||||
var AsyncFunction = async function foo() {}.constructor;
|
||||
AsyncFunction.prototype.x = 1;
|
||||
assert.sameValue(AsyncFunction.prototype.x, 1);
|
||||
|
||||
|
|
|
@ -6,5 +6,5 @@ author: Brian Terlson <brian.terlson@microsoft.com>
|
|||
esid: sec-sync-function-prototype-properties
|
||||
description: AsyncFunction.prototype has a [[prototype]] of Function.prototype
|
||||
---*/
|
||||
var AsyncFunction = async function foo() { }.constructor;
|
||||
var AsyncFunction = async function foo() {}.constructor;
|
||||
assert.sameValue(Object.getPrototypeOf(AsyncFunction.prototype), Function.prototype);
|
||||
|
|
|
@ -10,7 +10,7 @@ includes: [propertyHelper.js]
|
|||
features: [Symbol.toStringTag]
|
||||
---*/
|
||||
|
||||
var AsyncFunction = async function foo() { }.constructor;
|
||||
var AsyncFunction = async function foo() {}.constructor;
|
||||
var AFP = AsyncFunction.prototype;
|
||||
assert.sameValue(AFP[Symbol.toStringTag], "AsyncFunction", "toStringTag value");
|
||||
verifyNotWritable(AFP, Symbol.toStringTag);
|
||||
|
|
|
@ -25,7 +25,7 @@ info: |
|
|||
...
|
||||
---*/
|
||||
|
||||
async function foo() { }
|
||||
async function foo() {}
|
||||
assert.throws(TypeError, function() {
|
||||
new foo();
|
||||
});
|
||||
|
|
|
@ -8,7 +8,7 @@ description: Async function declarations have a name property
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
async function foo () { };
|
||||
async function foo() {};
|
||||
|
||||
assert.sameValue(foo.name, "foo");
|
||||
verifyNotWritable(foo, "name");
|
||||
|
|
|
@ -10,9 +10,9 @@ description: >
|
|||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
async function l0() { }
|
||||
async function l1(a) { }
|
||||
async function l2(a, b) { }
|
||||
async function l0() {}
|
||||
async function l1(a) {}
|
||||
async function l2(a, b) {}
|
||||
assert.sameValue(l0.length, 0);
|
||||
assert.sameValue(l1.length, 1);
|
||||
assert.sameValue(l2.length, 2)
|
||||
|
|
|
@ -7,6 +7,6 @@ esid: sec-async-function-instances
|
|||
description: >
|
||||
Async function instances do not have a prototype property.
|
||||
---*/
|
||||
async function foo() { };
|
||||
async function foo() {};
|
||||
assert.sameValue(foo.prototype, undefined, 'foo.prototype should be undefined');
|
||||
assert(!foo.hasOwnProperty('prototype'), 'foo.prototype should not exist');
|
||||
|
|
|
@ -8,6 +8,6 @@ description: >
|
|||
%AsyncFunction% is not exposed as a global
|
||||
---*/
|
||||
|
||||
assert.throws(ReferenceError, function () {
|
||||
assert.throws(ReferenceError, function() {
|
||||
AsyncFunction
|
||||
}, "AsyncFunction should not be present as a global");
|
||||
|
|
Loading…
Reference in New Issue