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.parameter_metadata_test; | 5 library test.parameter_metadata_test; |
6 | 6 |
| 7 @MirrorsUsed(targets: "test.parameter_metadata_test") |
7 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
8 | 9 |
9 import 'metadata_test.dart'; | 10 import 'metadata_test.dart'; |
10 | 11 |
11 const m1 = 'm1'; | 12 const m1 = 'm1'; |
12 const m2 = #m2; | 13 const m2 = #m2; |
13 const m3 = const CustomAnnotation(3); | 14 const m3 = const CustomAnnotation(3); |
14 | 15 |
15 class CustomAnnotation { | 16 class CustomAnnotation { |
16 final value; | 17 final value; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 checkMetadata(mm.parameters[0], []); | 55 checkMetadata(mm.parameters[0], []); |
55 checkMetadata(mm.parameters[1], []); | 56 checkMetadata(mm.parameters[1], []); |
56 | 57 |
57 mm = cm.declarations[#corge]; | 58 mm = cm.declarations[#corge]; |
58 checkMetadata(mm.parameters[0], [m1]); | 59 checkMetadata(mm.parameters[0], [m1]); |
59 checkMetadata(mm.parameters[1], [m2]); | 60 checkMetadata(mm.parameters[1], [m2]); |
60 | 61 |
61 mm = cm.declarations[const Symbol('x=')]; | 62 mm = cm.declarations[const Symbol('x=')]; |
62 checkMetadata(mm.parameters[0], [m2]); | 63 checkMetadata(mm.parameters[0], [m2]); |
63 } | 64 } |
OLD | NEW |