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

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

Issue 21155003: Improve test coverage for reflection on mixins. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/lib.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "dart:mirrors";
6
7 import "package:expect/expect.dart";
8
9 class Fooer {
10 foo1();
11 }
12
13 class S implements Fooer {
14 foo1() {}
15 foo2() {}
16 }
17
18 class M1 {
19 bar1() {}
20 bar2() {}
21 }
22
23 class M2 {
24 baz1() {}
25 baz2() {}
26 }
27
28 class C extends S with M1, M2 {}
29
30 main() {
31 ClassMirror cm = reflectClass(C);
32 Classmirror sM1M2 = cm.superclass;
33 Classmirror sM1 = sM1M2.superclass;
34 ClassMirror s = sM1.superclass;
35 Expect.equals(0, cm.members.length);
36 Expect.setEquals(sM1M2.members.keys,
37 [const Symbol("baz1"), const Symbol("baz2")]);
38 Expect.setEquals(sM1M2.superinterfaces.map((e) => e.simpleName),
39 [const Symbol("M2")]);
40 Expect.setEquals(sM1.members.keys,
41 [const Symbol("bar1"), const Symbol("bar2")]);
42 Expect.setEquals(sM1.superinterfaces.map((e) => e.simpleName),
43 [const Symbol("M1")]);
44 Expect.setEquals(s.members.keys.toSet(),
45 [const Symbol("foo1"), const Symbol("foo2")]);
46 Expect.setEquals(s.superinterfaces.map((e) => e.simpleName),
47 [const Symbol("Fooer")]);
48 Expect.equals(true, reflectClass(S) == s);
49 }
OLDNEW
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698