OLD | NEW |
(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 } |
OLD | NEW |