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 library test.reflect_model_test; | 5 library test.reflect_model_test; |
6 | 6 |
| 7 @MirrorsUsed(targets: "test.reflect_model_test") |
7 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
8 | 9 |
9 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
10 | 11 |
11 import 'model.dart'; | 12 import 'model.dart'; |
12 import 'stringify.dart'; | 13 import 'stringify.dart'; |
13 | 14 |
14 isNoSuchMethodError(e) => e is NoSuchMethodError; | 15 isNoSuchMethodError(e) => e is NoSuchMethodError; |
15 | 16 |
16 variablesOf(ClassMirror cm) { | 17 variablesOf(ClassMirror cm) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 Expect.equals('aMethod', c.invoke(aMethod, []).reflectee); | 133 Expect.equals('aMethod', c.invoke(aMethod, []).reflectee); |
133 | 134 |
134 Expect.throws(() { a.invoke(bMethod, []); }, isNoSuchMethodError); | 135 Expect.throws(() { a.invoke(bMethod, []); }, isNoSuchMethodError); |
135 Expect.equals('bMethod', b.invoke(bMethod, []).reflectee); | 136 Expect.equals('bMethod', b.invoke(bMethod, []).reflectee); |
136 Expect.equals('bMethod', c.invoke(bMethod, []).reflectee); | 137 Expect.equals('bMethod', c.invoke(bMethod, []).reflectee); |
137 | 138 |
138 Expect.throws(() { a.invoke(cMethod, []); }, isNoSuchMethodError); | 139 Expect.throws(() { a.invoke(cMethod, []); }, isNoSuchMethodError); |
139 Expect.throws(() { b.invoke(cMethod, []); }, isNoSuchMethodError); | 140 Expect.throws(() { b.invoke(cMethod, []); }, isNoSuchMethodError); |
140 Expect.equals('cMethod', c.invoke(cMethod, []).reflectee); | 141 Expect.equals('cMethod', c.invoke(cMethod, []).reflectee); |
141 } | 142 } |
OLD | NEW |