mirror of
https://github.com/tc39/test262.git
synced 2025-07-22 13:34:38 +02:00
Fixing async tests and other NIT changes
This commit is contained in:
parent
442c3539a3
commit
4e3e82ee3f
@ -1,6 +1,4 @@
|
||||
// Copyright (C) 2019 Caio Lima. All rights reserved.
|
||||
// Copyright (C) 2018 Jaideep Bhoosreddy (Bloomberg LP). All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
|
@ -1,6 +1,4 @@
|
||||
// Copyright (C) 2019 Caio Lima. All rights reserved.
|
||||
// Copyright (C) 2018 Jaideep Bhoosreddy (Bloomberg LP). All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
@ -18,6 +16,7 @@ info: |
|
||||
CallExpression[?Yield, ?Await].PrivateName
|
||||
template: default
|
||||
features: [class-fields-private, async-functions, arrow-function]
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
@ -29,9 +28,6 @@ method() {
|
||||
//- assertions
|
||||
let c = new C();
|
||||
|
||||
async function asyncRun() {
|
||||
assert.sameValue(await c.method(), 'test262');
|
||||
}
|
||||
|
||||
asyncRun();
|
||||
c.method().then((value) => assert.sameValue(value, 'test262'))
|
||||
.then($DONE, $DONE);
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
// Copyright (C) 2019 Caio Lima. All rights reserved.
|
||||
// Copyright (C) 2018 Jaideep Bhoosreddy (Bloomberg LP). All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
@ -18,6 +16,7 @@ info: |
|
||||
CallExpression[?Yield, ?Await].PrivateName
|
||||
template: default
|
||||
features: [class-fields-private, async-functions]
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
//- elements
|
||||
@ -29,9 +28,6 @@ method() {
|
||||
//- assertions
|
||||
let c = new C();
|
||||
|
||||
async function asyncRun() {
|
||||
assert.sameValue(await c.method(), 'test262');
|
||||
}
|
||||
|
||||
asyncRun();
|
||||
c.method().then((value) => assert.sameValue(value, 'test262'))
|
||||
.then($DONE, $DONE);
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
// Copyright (C) 2019 Caio Lima. All rights reserved.
|
||||
// Copyright (C) 2018 Jaideep Bhoosreddy (Bloomberg LP). All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
|
@ -2,7 +2,7 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
desc: Acessing private field from super shoudl throw an error
|
||||
desc: Acessing private field from super should throw an error
|
||||
info: |
|
||||
Updated Productions
|
||||
|
||||
@ -33,10 +33,10 @@ Child = class extends C {
|
||||
|
||||
//- assertions
|
||||
assert.throws(TypeError, function() {
|
||||
(new (new C()).Child).method();
|
||||
(new (new C()).Child()).method();
|
||||
}, 'super.#m() throws TypeError');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
(new (new C()).Child).access();
|
||||
(new (new C()).Child()).access();
|
||||
}, 'super.#m throws TypeError');
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
description: Calling async arrow function returned from private field access (field definitions in a class expression)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-fields-private, async-functions, arrow-function, class]
|
||||
flags: [generated]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
Updated Productions
|
||||
|
||||
@ -31,9 +31,6 @@ var C = class {
|
||||
|
||||
let c = new C();
|
||||
|
||||
async function asyncRun() {
|
||||
assert.sameValue(await c.method(), 'test262');
|
||||
}
|
||||
|
||||
asyncRun();
|
||||
c.method().then((value) => assert.sameValue(value, 'test262'))
|
||||
.then($DONE, $DONE);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
description: Calling async function returned from private field access (field definitions in a class expression)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-fields-private, async-functions, class]
|
||||
flags: [generated]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
Updated Productions
|
||||
|
||||
@ -31,9 +31,6 @@ var C = class {
|
||||
|
||||
let c = new C();
|
||||
|
||||
async function asyncRun() {
|
||||
assert.sameValue(await c.method(), 'test262');
|
||||
}
|
||||
|
||||
asyncRun();
|
||||
c.method().then((value) => assert.sameValue(value, 'test262'))
|
||||
.then($DONE, $DONE);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// - src/class-elements/private-field-super-access-throws.case
|
||||
// - src/class-elements/default/cls-expr.template
|
||||
/*---
|
||||
description: Acessing private field from super shoudl throw an error (field definitions in a class expression)
|
||||
description: Acessing private field from super should throw an error (field definitions in a class expression)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-fields-private, class-fields-public, class]
|
||||
flags: [generated]
|
||||
@ -37,10 +37,10 @@ var C = class {
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
(new (new C()).Child).method();
|
||||
(new (new C()).Child()).method();
|
||||
}, 'super.#m() throws TypeError');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
(new (new C()).Child).access();
|
||||
(new (new C()).Child()).access();
|
||||
}, 'super.#m throws TypeError');
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
description: Calling async arrow function returned from private field access (field definitions in a class declaration)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-fields-private, async-functions, arrow-function, class]
|
||||
flags: [generated]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
Updated Productions
|
||||
|
||||
@ -31,9 +31,6 @@ class C {
|
||||
|
||||
let c = new C();
|
||||
|
||||
async function asyncRun() {
|
||||
assert.sameValue(await c.method(), 'test262');
|
||||
}
|
||||
|
||||
asyncRun();
|
||||
c.method().then((value) => assert.sameValue(value, 'test262'))
|
||||
.then($DONE, $DONE);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
description: Calling async function returned from private field access (field definitions in a class declaration)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-fields-private, async-functions, class]
|
||||
flags: [generated]
|
||||
flags: [generated, async]
|
||||
info: |
|
||||
Updated Productions
|
||||
|
||||
@ -31,9 +31,6 @@ class C {
|
||||
|
||||
let c = new C();
|
||||
|
||||
async function asyncRun() {
|
||||
assert.sameValue(await c.method(), 'test262');
|
||||
}
|
||||
|
||||
asyncRun();
|
||||
c.method().then((value) => assert.sameValue(value, 'test262'))
|
||||
.then($DONE, $DONE);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// - src/class-elements/private-field-super-access-throws.case
|
||||
// - src/class-elements/default/cls-decl.template
|
||||
/*---
|
||||
description: Acessing private field from super shoudl throw an error (field definitions in a class declaration)
|
||||
description: Acessing private field from super should throw an error (field definitions in a class declaration)
|
||||
esid: prod-FieldDefinition
|
||||
features: [class-fields-private, class-fields-public, class]
|
||||
flags: [generated]
|
||||
@ -37,10 +37,10 @@ class C {
|
||||
}
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
(new (new C()).Child).method();
|
||||
(new (new C()).Child()).method();
|
||||
}, 'super.#m() throws TypeError');
|
||||
|
||||
assert.throws(TypeError, function() {
|
||||
(new (new C()).Child).access();
|
||||
(new (new C()).Child()).access();
|
||||
}, 'super.#m throws TypeError');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user