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

Side by Side Diff: tests/lib/mirrors/synthetic_accessor_properties_test.dart

Issue 164823006: Remove LibraryMirror.topLevelMembers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: sync Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « tests/lib/mirrors/mirrors_reader.dart ('k') | tests/lib/mirrors/toplevel_members_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.synthetic_accessor_properties; 5 library test.synthetic_accessor_properties;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 9
10 import 'stringify.dart'; 10 import 'stringify.dart';
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 expect('Parameter(s(staticField) in s(staticField=), final,' 60 expect('Parameter(s(staticField) in s(staticField=), final,'
61 ' type = Class(s(bool) in s(dart.core), top-level))', pm); 61 ' type = Class(s(bool) in s(dart.core), top-level))', pm);
62 62
63 mm = cm.staticMembers[#finalStaticField]; 63 mm = cm.staticMembers[#finalStaticField];
64 expect('Method(s(finalStaticField) in s(C), synthetic, static, getter)', mm); 64 expect('Method(s(finalStaticField) in s(C), synthetic, static, getter)', mm);
65 Expect.equals(reflectClass(int), mm.returnType); 65 Expect.equals(reflectClass(int), mm.returnType);
66 Expect.listEquals([], mm.parameters); 66 Expect.listEquals([], mm.parameters);
67 67
68 mm = cm.staticMembers[const Symbol('finalStaticField=')]; 68 mm = cm.staticMembers[const Symbol('finalStaticField=')];
69 Expect.isNull(mm); 69 Expect.isNull(mm);
70
71
72 mm = lm.topLevelMembers[#topLevelField];
73 expect('Method(s(topLevelField) in s(test.synthetic_accessor_properties),'
74 ' top-level, synthetic, static, getter)', mm);
75 Expect.equals(reflectClass(String), mm.returnType);
76 Expect.listEquals([], mm.parameters);
77
78 mm = lm.topLevelMembers[const Symbol('topLevelField=')];
79 expect('Method(s(topLevelField=) in s(test.synthetic_accessor_properties),'
80 ' top-level, synthetic, static, setter)', mm);
81 Expect.equals(reflectClass(String), mm.returnType);
82 pm = mm.parameters.single;
83 expect('Parameter(s(topLevelField) in s(topLevelField=), final,'
84 ' type = Class(s(String) in s(dart.core), top-level))', pm);
85
86 mm = lm.topLevelMembers[#finalTopLevelField];
87 expect('Method(s(finalTopLevelField) in s(test.synthetic_accessor_properties)'
88 ', top-level, synthetic, static, getter)', mm);
89 Expect.equals(reflectClass(double), mm.returnType);
90 Expect.listEquals([], mm.parameters);
91
92 mm = lm.topLevelMembers[const Symbol('finalTopLevelField=')];
93 Expect.isNull(mm);
94
95 return; /// 01: ok
96
97 mm = lm.topLevelMembers[#C];
98 expect('Method(s(C) in s(test.synthetic_accessor_properties),'
99 ' top-level, synthetic, static, getter)', mm);
100 Expect.equals(reflectClass(Type), mm.returnType);
101 Expect.listEquals([], mm.parameters);
102
103 mm = lm.topLevelMembers[const Symbol('C=')];
104 Expect.isNull(mm);
105 } 70 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/mirrors_reader.dart ('k') | tests/lib/mirrors/toplevel_members_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698