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; | 5 library test; |
6 | 6 |
| 7 @MirrorsUsed(targets: "test") |
7 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
8 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
9 | 10 |
10 typedef int _F(int i); | 11 typedef int _F(int i); |
11 | 12 |
12 class _C<_T> { | 13 class _C<_T> { |
13 get g {} | 14 get g {} |
14 set s(x) {} | 15 set s(x) {} |
15 m(_p) {} | 16 m(_p) {} |
16 get _g {} | 17 get _g {} |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 Expect.throws(() => MirrorSystem.getSymbol('_private'), | 125 Expect.throws(() => MirrorSystem.getSymbol('_private'), |
125 (e) => e is ArgumentError); | 126 (e) => e is ArgumentError); |
126 | 127 |
127 var notALibraryMirror = 7; | 128 var notALibraryMirror = 7; |
128 Expect.throws(() => MirrorSystem.getSymbol('_private', notALibraryMirror), | 129 Expect.throws(() => MirrorSystem.getSymbol('_private', notALibraryMirror), |
129 (e) => e is ArgumentError || e is TypeError); | 130 (e) => e is ArgumentError || e is TypeError); |
130 | 131 |
131 Expect.throws(() => MirrorSystem.getSymbol('public', notALibraryMirror), | 132 Expect.throws(() => MirrorSystem.getSymbol('public', notALibraryMirror), |
132 (e) => e is ArgumentError || e is TypeError); | 133 (e) => e is ArgumentError || e is TypeError); |
133 } | 134 } |
OLD | NEW |