| Index: test/mjsunit/harmony/class-fields-async-syntax.js
|
| diff --git a/test/mjsunit/harmony/class-fields-async-syntax.js b/test/mjsunit/harmony/class-fields-async-syntax.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..990737294a65a682f2d3126a2c10c30927b905d9
|
| --- /dev/null
|
| +++ b/test/mjsunit/harmony/class-fields-async-syntax.js
|
| @@ -0,0 +1,89 @@
|
| +// Copyright 2016 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// Flags: --harmony-class-fields --harmony-async-await
|
| +
|
| +{
|
| + class C {
|
| + async = 0;
|
| + }
|
| +
|
| + let c = new C;
|
| + assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
|
| + assertArrayEquals(['async'], Object.getOwnPropertyNames(c));
|
| +}
|
| +
|
| +{
|
| + class C {
|
| + async;
|
| + }
|
| +
|
| + let c = new C;
|
| + assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
|
| + assertArrayEquals(['async'], Object.getOwnPropertyNames(c));
|
| +}
|
| +
|
| +{
|
| + class C {
|
| + async = 0
|
| + }
|
| +
|
| + let c = new C;
|
| + assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
|
| + assertArrayEquals(['async'], Object.getOwnPropertyNames(c));
|
| +}
|
| +
|
| +{
|
| + class C {
|
| + async
|
| + }
|
| +
|
| + let c = new C;
|
| + assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
|
| + assertArrayEquals(['async'], Object.getOwnPropertyNames(c));
|
| +}
|
| +
|
| +{
|
| + class C {
|
| + static async = 0;
|
| + }
|
| +
|
| + let c = new C;
|
| + assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
|
| + assertTrue(C.hasOwnProperty('async'));
|
| + assertArrayEquals([], Object.getOwnPropertyNames(c));
|
| +}
|
| +
|
| +{
|
| + class C {
|
| + static async;
|
| + }
|
| +
|
| + let c = new C;
|
| + assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
|
| + assertTrue(C.hasOwnProperty('async'));
|
| + assertArrayEquals([], Object.getOwnPropertyNames(c));
|
| +}
|
| +
|
| +{
|
| + class C {
|
| + static async = 0
|
| + }
|
| +
|
| + let c = new C;
|
| + assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
|
| + assertTrue(C.hasOwnProperty('async'));
|
| + assertArrayEquals([], Object.getOwnPropertyNames(c));
|
| +}
|
| +
|
| +{
|
| + class C {
|
| + static async
|
| + }
|
| +
|
| + let c = new C;
|
| + assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
|
| + assertTrue(C.hasOwnProperty('async'));
|
| + assertArrayEquals([], Object.getOwnPropertyNames(c));
|
| +}
|
|
|