built-ins/AsyncFunction/*: make all indentation consistent (depth & character)

This commit is contained in:
Rick Waldron 2018-02-12 10:15:52 -05:00
parent 66eaf57f88
commit 8342824894
15 changed files with 17 additions and 19 deletions

View File

@ -9,7 +9,7 @@ description: >
similarly to functions. similarly to functions.
---*/ ---*/
var AsyncFunction = async function foo() { }.constructor; var AsyncFunction = async function foo() {}.constructor;
var fn; var fn;
fn = AsyncFunction("a", "await 1;"); fn = AsyncFunction("a", "await 1;");

View File

@ -8,6 +8,6 @@ description: >
%AsyncFunction% is extensible %AsyncFunction% is extensible
---*/ ---*/
var AsyncFunction = async function() { }.constructor; var AsyncFunction = async function() {}.constructor;
AsyncFunction.x = 1; AsyncFunction.x = 1;
assert.sameValue(AsyncFunction.x, 1); assert.sameValue(AsyncFunction.x, 1);

View File

@ -7,9 +7,8 @@ esid: sec-async-function-constructor
description: > description: >
%AsyncFunction% is a subclass of Function %AsyncFunction% is a subclass of Function
---*/ ---*/
async function foo() { }; async function foo() {};
var AsyncFunction = foo.constructor; var AsyncFunction = foo.constructor;
assert.sameValue(Object.getPrototypeOf(AsyncFunction), Function, "Prototype of constructor is Function"); 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.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'); assert(foo instanceof Function, 'async function instance is instanceof Function');

View File

@ -9,7 +9,7 @@ description: >
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
var AsyncFunction = async function foo() { }.constructor; var AsyncFunction = async function foo() {}.constructor;
assert.sameValue(AsyncFunction.length, 1); assert.sameValue(AsyncFunction.length, 1);
verifyNotWritable(AsyncFunction, 'length'); verifyNotWritable(AsyncFunction, 'length');
verifyNotEnumerable(AsyncFunction, 'length'); verifyNotEnumerable(AsyncFunction, 'length');

View File

@ -9,7 +9,7 @@ description: >
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
var AsyncFunction = async function foo() { }.constructor; var AsyncFunction = async function foo() {}.constructor;
assert.sameValue(AsyncFunction.name, "AsyncFunction"); assert.sameValue(AsyncFunction.name, "AsyncFunction");
verifyNotWritable(AsyncFunction, "name"); verifyNotWritable(AsyncFunction, "name");
verifyNotEnumerable(AsyncFunction, "name"); verifyNotEnumerable(AsyncFunction, "name");

View File

@ -8,7 +8,7 @@ description: AsyncFunction has a prototype property with writable false, enumera
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
var AsyncFunction = async function foo() { }.constructor; var AsyncFunction = async function foo() {}.constructor;
verifyNotConfigurable(AsyncFunction, 'prototype'); verifyNotConfigurable(AsyncFunction, 'prototype');
verifyNotWritable(AsyncFunction, 'prototype'); verifyNotWritable(AsyncFunction, 'prototype');
verifyNotEnumerable(AsyncFunction, 'prototype'); verifyNotEnumerable(AsyncFunction, 'prototype');

View File

@ -8,5 +8,5 @@ description: >
%AsyncFunction% exists and is a function %AsyncFunction% exists and is a function
---*/ ---*/
var AsyncFunction = async function foo() { }.constructor; var AsyncFunction = async function foo() {}.constructor;
assert.sameValue(typeof AsyncFunction, "function"); assert.sameValue(typeof AsyncFunction, "function");

View File

@ -8,7 +8,6 @@ description: >
%AsyncFunctionPrototype% has a [[Extensible]] of true %AsyncFunctionPrototype% has a [[Extensible]] of true
---*/ ---*/
var AsyncFunction = async function foo() { }.constructor; var AsyncFunction = async function foo() {}.constructor;
AsyncFunction.prototype.x = 1; AsyncFunction.prototype.x = 1;
assert.sameValue(AsyncFunction.prototype.x, 1); assert.sameValue(AsyncFunction.prototype.x, 1);

View File

@ -6,5 +6,5 @@ author: Brian Terlson <brian.terlson@microsoft.com>
esid: sec-sync-function-prototype-properties esid: sec-sync-function-prototype-properties
description: AsyncFunction.prototype has a [[prototype]] of Function.prototype 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); assert.sameValue(Object.getPrototypeOf(AsyncFunction.prototype), Function.prototype);

View File

@ -10,7 +10,7 @@ includes: [propertyHelper.js]
features: [Symbol.toStringTag] features: [Symbol.toStringTag]
---*/ ---*/
var AsyncFunction = async function foo() { }.constructor; var AsyncFunction = async function foo() {}.constructor;
var AFP = AsyncFunction.prototype; var AFP = AsyncFunction.prototype;
assert.sameValue(AFP[Symbol.toStringTag], "AsyncFunction", "toStringTag value"); assert.sameValue(AFP[Symbol.toStringTag], "AsyncFunction", "toStringTag value");
verifyNotWritable(AFP, Symbol.toStringTag); verifyNotWritable(AFP, Symbol.toStringTag);

View File

@ -25,7 +25,7 @@ info: |
... ...
---*/ ---*/
async function foo() { } async function foo() {}
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
new foo(); new foo();
}); });

View File

@ -8,7 +8,7 @@ description: Async function declarations have a name property
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
async function foo () { }; async function foo() {};
assert.sameValue(foo.name, "foo"); assert.sameValue(foo.name, "foo");
verifyNotWritable(foo, "name"); verifyNotWritable(foo, "name");

View File

@ -10,9 +10,9 @@ description: >
includes: [propertyHelper.js] includes: [propertyHelper.js]
---*/ ---*/
async function l0() { } async function l0() {}
async function l1(a) { } async function l1(a) {}
async function l2(a, b) { } async function l2(a, b) {}
assert.sameValue(l0.length, 0); assert.sameValue(l0.length, 0);
assert.sameValue(l1.length, 1); assert.sameValue(l1.length, 1);
assert.sameValue(l2.length, 2) assert.sameValue(l2.length, 2)

View File

@ -7,6 +7,6 @@ esid: sec-async-function-instances
description: > description: >
Async function instances do not have a prototype property. 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.sameValue(foo.prototype, undefined, 'foo.prototype should be undefined');
assert(!foo.hasOwnProperty('prototype'), 'foo.prototype should not exist'); assert(!foo.hasOwnProperty('prototype'), 'foo.prototype should not exist');

View File

@ -8,6 +8,6 @@ description: >
%AsyncFunction% is not exposed as a global %AsyncFunction% is not exposed as a global
---*/ ---*/
assert.throws(ReferenceError, function () { assert.throws(ReferenceError, function() {
AsyncFunction AsyncFunction
}, "AsyncFunction should not be present as a global"); }, "AsyncFunction should not be present as a global");