| OLD | NEW |
| 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 import "dart:mirrors"; | 5 import "dart:mirrors"; |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 8 | 8 |
| 9 class WannabeFunction { | 9 class WannabeFunction { |
| 10 int call(int a, int b) => a + b; | 10 int call(int a, int b) => a + b; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 Expect.equals(#int, mm.returnType.simpleName); | 35 Expect.equals(#int, mm.returnType.simpleName); |
| 36 Expect.equals(#int, mm.parameters[0].type.simpleName); | 36 Expect.equals(#int, mm.parameters[0].type.simpleName); |
| 37 Expect.equals(#int, mm.parameters[1].type.simpleName); | 37 Expect.equals(#int, mm.parameters[1].type.simpleName); |
| 38 | 38 |
| 39 ClassMirror km = cm.type; | 39 ClassMirror km = cm.type; |
| 40 Expect.equals(reflectClass(WannabeFunction), km); | 40 Expect.equals(reflectClass(WannabeFunction), km); |
| 41 Expect.equals(#WannabeFunction, km.simpleName); | 41 Expect.equals(#WannabeFunction, km.simpleName); |
| 42 Expect.equals(mm, km.members[#call]); | 42 Expect.equals(mm, km.members[#call]); |
| 43 Expect.setEquals([#call, #method], km.members.keys); | 43 Expect.setEquals([#call, #method], km.members.keys); |
| 44 } | 44 } |
| OLD | NEW |