OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 reflective.tests; | 5 library reflective.tests; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 @MirrorsUsed(metaTargets: 'ReflectiveTestCase') | 9 @MirrorsUsed(metaTargets: 'ReflectiveTestCase') |
10 import 'dart:mirrors'; | 10 import 'dart:mirrors'; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 _invokeSymbolIfExists(instanceMirror, #tearDown); | 90 _invokeSymbolIfExists(instanceMirror, #tearDown); |
91 } | 91 } |
92 | 92 |
93 | 93 |
94 void _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { | 94 void _invokeSymbolIfExists(InstanceMirror instanceMirror, Symbol symbol) { |
95 try { | 95 try { |
96 instanceMirror.invoke(symbol, []); | 96 instanceMirror.invoke(symbol, []); |
97 } on NoSuchMethodError catch (e) { | 97 } on NoSuchMethodError catch (e) { |
98 } | 98 } |
99 } | 99 } |
OLD | NEW |