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.instance_members_with_override; | 5 library test.instance_members_with_override; |
6 | 6 |
| 7 @MirrorsUsed(targets: "test.instance_members_with_override") |
7 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
8 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
9 | 10 |
10 class S { | 11 class S { |
11 var field; | 12 var field; |
12 final finalField = 0; | 13 final finalField = 0; |
13 method() {} | 14 method() {} |
14 get getter {} | 15 get getter {} |
15 set setter(x) {} | 16 set setter(x) {} |
16 notOverridden() {} | 17 notOverridden() {} |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 Expect.equals(cMirror, cMirror.instanceMembers[#field].owner); | 75 Expect.equals(cMirror, cMirror.instanceMembers[#field].owner); |
75 Expect.equals(cMirror, cMirror.instanceMembers[const Symbol('field=')].owner); | 76 Expect.equals(cMirror, cMirror.instanceMembers[const Symbol('field=')].owner); |
76 Expect.equals(cMirror, cMirror.instanceMembers[#finalField].owner); | 77 Expect.equals(cMirror, cMirror.instanceMembers[#finalField].owner); |
77 Expect.equals(cMirror, cMirror.instanceMembers[#method].owner); | 78 Expect.equals(cMirror, cMirror.instanceMembers[#method].owner); |
78 Expect.equals(cMirror, cMirror.instanceMembers[#getter].owner); | 79 Expect.equals(cMirror, cMirror.instanceMembers[#getter].owner); |
79 Expect.equals(cMirror,cMirror.instanceMembers[const Symbol('setter=')].owner); | 80 Expect.equals(cMirror,cMirror.instanceMembers[const Symbol('setter=')].owner); |
80 | 81 |
81 Expect.equals(sMirror, sMirror.instanceMembers[#notOverridden].owner); | 82 Expect.equals(sMirror, sMirror.instanceMembers[#notOverridden].owner); |
82 Expect.equals(sMirror, cMirror.instanceMembers[#notOverridden].owner); | 83 Expect.equals(sMirror, cMirror.instanceMembers[#notOverridden].owner); |
83 } | 84 } |
OLD | NEW |