| 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.metadata_test; | 5 library test.metadata_test; |
| 6 | 6 |
| 7 @MirrorsUsed(targets: "test.metadata_test") |
| 7 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
| 8 | 9 |
| 9 const string = 'a metadata string'; | 10 const string = 'a metadata string'; |
| 10 | 11 |
| 11 const symbol = const Symbol('symbol'); | 12 const symbol = const Symbol('symbol'); |
| 12 | 13 |
| 13 const hest = 'hest'; | 14 const hest = 'hest'; |
| 14 | 15 |
| 15 @symbol @string | 16 @symbol @string |
| 16 class MyClass { | 17 class MyClass { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 checkMetadata(method, []); | 63 checkMetadata(method, []); |
| 63 | 64 |
| 64 VariableMirror xMirror = myClassMirror.declarations[#x]; | 65 VariableMirror xMirror = myClassMirror.declarations[#x]; |
| 65 checkMetadata(xMirror, [hest, hest, symbol]); | 66 checkMetadata(xMirror, [hest, hest, symbol]); |
| 66 | 67 |
| 67 VariableMirror yMirror = myClassMirror.declarations[#y]; | 68 VariableMirror yMirror = myClassMirror.declarations[#y]; |
| 68 checkMetadata(yMirror, []); | 69 checkMetadata(yMirror, []); |
| 69 | 70 |
| 70 // TODO(ahe): Test local functions. | 71 // TODO(ahe): Test local functions. |
| 71 } | 72 } |
| OLD | NEW |