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.invoke_private_test; | 5 library test.invoke_private_test; |
6 | 6 |
| 7 @MirrorsUsed(targets: "invoke_private_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 class C { | 12 class C { |
12 var _field; | 13 var _field; |
13 C() : this._field = 'default'; | 14 C() : this._field = 'default'; |
14 C._named(this._field); | 15 C._named(this._field); |
15 | 16 |
16 get _getter => 'get $_field'; | 17 get _getter => 'get $_field'; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 result = lm.getField(#_libraryGetter); | 77 result = lm.getField(#_libraryGetter); |
77 Expect.equals('lget a priori', result.reflectee); | 78 Expect.equals('lget a priori', result.reflectee); |
78 result = lm.getField(#_libraryField); | 79 result = lm.getField(#_libraryField); |
79 Expect.equals('a priori', result.reflectee); | 80 Expect.equals('a priori', result.reflectee); |
80 | 81 |
81 lm.setField(#_librarySetter, 'lfoo'); | 82 lm.setField(#_librarySetter, 'lfoo'); |
82 Expect.equals('lset lfoo', _libraryField); | 83 Expect.equals('lset lfoo', _libraryField); |
83 lm.setField(#_libraryField, 'lbar'); | 84 lm.setField(#_libraryField, 'lbar'); |
84 Expect.equals('lbar', _libraryField); | 85 Expect.equals('lbar', _libraryField); |
85 } | 86 } |
OLD | NEW |