Fixing async tests and other NIT changes

This commit is contained in:
Caio Lima 2019-02-06 18:18:48 -02:00
parent 442c3539a3
commit 4e3e82ee3f
11 changed files with 27 additions and 51 deletions

View File

@ -1,6 +1,4 @@
// Copyright (C) 2019 Caio Lima. All rights reserved. // 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---

View File

@ -1,6 +1,4 @@
// Copyright (C) 2019 Caio Lima. All rights reserved. // 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
@ -18,6 +16,7 @@ info: |
CallExpression[?Yield, ?Await].PrivateName CallExpression[?Yield, ?Await].PrivateName
template: default template: default
features: [class-fields-private, async-functions, arrow-function] features: [class-fields-private, async-functions, arrow-function]
flags: [async]
---*/ ---*/
//- elements //- elements
@ -29,9 +28,6 @@ method() {
//- assertions //- assertions
let c = new C(); let c = new C();
async function asyncRun() { c.method().then((value) => assert.sameValue(value, 'test262'))
assert.sameValue(await c.method(), 'test262'); .then($DONE, $DONE);
}
asyncRun();

View File

@ -1,6 +1,4 @@
// Copyright (C) 2019 Caio Lima. All rights reserved. // 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---
@ -18,6 +16,7 @@ info: |
CallExpression[?Yield, ?Await].PrivateName CallExpression[?Yield, ?Await].PrivateName
template: default template: default
features: [class-fields-private, async-functions] features: [class-fields-private, async-functions]
flags: [async]
---*/ ---*/
//- elements //- elements
@ -29,9 +28,6 @@ method() {
//- assertions //- assertions
let c = new C(); let c = new C();
async function asyncRun() { c.method().then((value) => assert.sameValue(value, 'test262'))
assert.sameValue(await c.method(), 'test262'); .then($DONE, $DONE);
}
asyncRun();

View File

@ -1,6 +1,4 @@
// Copyright (C) 2019 Caio Lima. All rights reserved. // 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. // This code is governed by the BSD license found in the LICENSE file.
/*--- /*---

View File

@ -2,7 +2,7 @@
// This code is governed by the BSD license found in the LICENSE file. // 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: | info: |
Updated Productions Updated Productions
@ -33,10 +33,10 @@ Child = class extends C {
//- assertions //- assertions
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
(new (new C()).Child).method(); (new (new C()).Child()).method();
}, 'super.#m() throws TypeError'); }, 'super.#m() throws TypeError');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
(new (new C()).Child).access(); (new (new C()).Child()).access();
}, 'super.#m throws TypeError'); }, 'super.#m throws TypeError');

View File

@ -5,7 +5,7 @@
description: Calling async arrow function returned from private field access (field definitions in a class expression) description: Calling async arrow function returned from private field access (field definitions in a class expression)
esid: prod-FieldDefinition esid: prod-FieldDefinition
features: [class-fields-private, async-functions, arrow-function, class] features: [class-fields-private, async-functions, arrow-function, class]
flags: [generated] flags: [generated, async]
info: | info: |
Updated Productions Updated Productions
@ -31,9 +31,6 @@ var C = class {
let c = new C(); let c = new C();
async function asyncRun() { c.method().then((value) => assert.sameValue(value, 'test262'))
assert.sameValue(await c.method(), 'test262'); .then($DONE, $DONE);
}
asyncRun();

View File

@ -5,7 +5,7 @@
description: Calling async function returned from private field access (field definitions in a class expression) description: Calling async function returned from private field access (field definitions in a class expression)
esid: prod-FieldDefinition esid: prod-FieldDefinition
features: [class-fields-private, async-functions, class] features: [class-fields-private, async-functions, class]
flags: [generated] flags: [generated, async]
info: | info: |
Updated Productions Updated Productions
@ -31,9 +31,6 @@ var C = class {
let c = new C(); let c = new C();
async function asyncRun() { c.method().then((value) => assert.sameValue(value, 'test262'))
assert.sameValue(await c.method(), 'test262'); .then($DONE, $DONE);
}
asyncRun();

View File

@ -2,7 +2,7 @@
// - src/class-elements/private-field-super-access-throws.case // - src/class-elements/private-field-super-access-throws.case
// - src/class-elements/default/cls-expr.template // - 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 esid: prod-FieldDefinition
features: [class-fields-private, class-fields-public, class] features: [class-fields-private, class-fields-public, class]
flags: [generated] flags: [generated]
@ -37,10 +37,10 @@ var C = class {
} }
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
(new (new C()).Child).method(); (new (new C()).Child()).method();
}, 'super.#m() throws TypeError'); }, 'super.#m() throws TypeError');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
(new (new C()).Child).access(); (new (new C()).Child()).access();
}, 'super.#m throws TypeError'); }, 'super.#m throws TypeError');

View File

@ -5,7 +5,7 @@
description: Calling async arrow function returned from private field access (field definitions in a class declaration) description: Calling async arrow function returned from private field access (field definitions in a class declaration)
esid: prod-FieldDefinition esid: prod-FieldDefinition
features: [class-fields-private, async-functions, arrow-function, class] features: [class-fields-private, async-functions, arrow-function, class]
flags: [generated] flags: [generated, async]
info: | info: |
Updated Productions Updated Productions
@ -31,9 +31,6 @@ class C {
let c = new C(); let c = new C();
async function asyncRun() { c.method().then((value) => assert.sameValue(value, 'test262'))
assert.sameValue(await c.method(), 'test262'); .then($DONE, $DONE);
}
asyncRun();

View File

@ -5,7 +5,7 @@
description: Calling async function returned from private field access (field definitions in a class declaration) description: Calling async function returned from private field access (field definitions in a class declaration)
esid: prod-FieldDefinition esid: prod-FieldDefinition
features: [class-fields-private, async-functions, class] features: [class-fields-private, async-functions, class]
flags: [generated] flags: [generated, async]
info: | info: |
Updated Productions Updated Productions
@ -31,9 +31,6 @@ class C {
let c = new C(); let c = new C();
async function asyncRun() { c.method().then((value) => assert.sameValue(value, 'test262'))
assert.sameValue(await c.method(), 'test262'); .then($DONE, $DONE);
}
asyncRun();

View File

@ -2,7 +2,7 @@
// - src/class-elements/private-field-super-access-throws.case // - src/class-elements/private-field-super-access-throws.case
// - src/class-elements/default/cls-decl.template // - 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 esid: prod-FieldDefinition
features: [class-fields-private, class-fields-public, class] features: [class-fields-private, class-fields-public, class]
flags: [generated] flags: [generated]
@ -37,10 +37,10 @@ class C {
} }
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
(new (new C()).Child).method(); (new (new C()).Child()).method();
}, 'super.#m() throws TypeError'); }, 'super.#m() throws TypeError');
assert.throws(TypeError, function() { assert.throws(TypeError, function() {
(new (new C()).Child).access(); (new (new C()).Child()).access();
}, 'super.#m throws TypeError'); }, 'super.#m throws TypeError');