| Index: test/mjsunit/harmony/class-fields-attributes.js
|
| diff --git a/test/mjsunit/harmony/class-fields-attributes.js b/test/mjsunit/harmony/class-fields-attributes.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..675af20c9d1bc2f052c7bf3228d941a14d78e702
|
| --- /dev/null
|
| +++ b/test/mjsunit/harmony/class-fields-attributes.js
|
| @@ -0,0 +1,26 @@
|
| +// 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
|
| +
|
| +{
|
| + class C {
|
| + a = 0;
|
| + b;
|
| + }
|
| +
|
| + let c = new C;
|
| +
|
| + var descriptor_a = Object.getOwnPropertyDescriptor(c, 'a');
|
| + assertEquals(0, descriptor_a.value);
|
| + assertTrue(descriptor_a.writable);
|
| + assertTrue(descriptor_a.configurable);
|
| + assertFalse(descriptor_a.enumerable);
|
| +
|
| + var descriptor_b = Object.getOwnPropertyDescriptor(c, 'b');
|
| + assertEquals(undefined, descriptor_b.value);
|
| + assertTrue(descriptor_b.writable);
|
| + assertTrue(descriptor_b.configurable);
|
| + assertFalse(descriptor_b.enumerable);
|
| +}
|
|
|