Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: test/mjsunit/harmony/class-fields-attributes.js

Issue 2330473002: Class fields, part 3 (backends)
Patch Set: bytecode test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+}
« no previous file with comments | « test/mjsunit/harmony/class-fields-async-syntax.js ('k') | test/mjsunit/harmony/class-fields-evaluation-order.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698