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

Side by Side Diff: test/mjsunit/harmony/class-fields-async-syntax.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --harmony-class-fields --harmony-async-await
6
7 {
8 class C {
9 async = 0;
10 }
11
12 let c = new C;
13 assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
14 assertArrayEquals(['async'], Object.getOwnPropertyNames(c));
15 }
16
17 {
18 class C {
19 async;
20 }
21
22 let c = new C;
23 assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
24 assertArrayEquals(['async'], Object.getOwnPropertyNames(c));
25 }
26
27 {
28 class C {
29 async = 0
30 }
31
32 let c = new C;
33 assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
34 assertArrayEquals(['async'], Object.getOwnPropertyNames(c));
35 }
36
37 {
38 class C {
39 async
40 }
41
42 let c = new C;
43 assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
44 assertArrayEquals(['async'], Object.getOwnPropertyNames(c));
45 }
46
47 {
48 class C {
49 static async = 0;
50 }
51
52 let c = new C;
53 assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
54 assertTrue(C.hasOwnProperty('async'));
55 assertArrayEquals([], Object.getOwnPropertyNames(c));
56 }
57
58 {
59 class C {
60 static async;
61 }
62
63 let c = new C;
64 assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
65 assertTrue(C.hasOwnProperty('async'));
66 assertArrayEquals([], Object.getOwnPropertyNames(c));
67 }
68
69 {
70 class C {
71 static async = 0
72 }
73
74 let c = new C;
75 assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
76 assertTrue(C.hasOwnProperty('async'));
77 assertArrayEquals([], Object.getOwnPropertyNames(c));
78 }
79
80 {
81 class C {
82 static async
83 }
84
85 let c = new C;
86 assertArrayEquals(['constructor'], Object.getOwnPropertyNames(C.prototype));
87 assertTrue(C.hasOwnProperty('async'));
88 assertArrayEquals([], Object.getOwnPropertyNames(c));
89 }
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/class-fields-arguments.js ('k') | test/mjsunit/harmony/class-fields-attributes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698