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

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

Issue 44813004: Tests for instanceMembers, staticMembers, toplevelMembers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
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 library test.instance_members_unimplemented_interface;
6
7 import 'dart:mirrors';
8 import 'package:expect/expect.dart';
9
10 class I {
11 implementMe() {}
12 }
13 abstract class C implements I {}
14
15 selectKeys(map, predicate) {
16 return map.keys.where((key) => predicate(map[key]));
17 }
18
19 main() {
20 ClassMirror cm = reflectClass(C);
21
22 // N.B.: Does not include #implementMe.
23 Expect.setEquals(
24 [#hashCode,
25 #runtimeType,
26 #==,
27 #noSuchMethod,
28 #toString],
29 selectKeys(cm.instanceMembers, (dm) => !dm.isPrivate));
30 // Filter out private to avoid implementation-specific members of Object.
31 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/instance_members_test.dart ('k') | tests/lib/mirrors/instance_members_with_override_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698