| 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 // Regression test for Issue 13817. | 5 // Regression test for Issue 13817. |
| 6 | 6 |
| 7 library test.metadata_constructor_arguments; | 7 library test.metadata_constructor_arguments; |
| 8 | 8 |
| 9 @MirrorsUsed(targets: "test.metadata_constructor_arguments") |
| 9 import 'dart:mirrors'; | 10 import 'dart:mirrors'; |
| 10 import 'package:expect/expect.dart'; | 11 import 'package:expect/expect.dart'; |
| 11 | 12 |
| 12 class Tag { | 13 class Tag { |
| 13 final name; | 14 final name; |
| 14 const Tag({named}) : this.name = named; | 15 const Tag({named}) : this.name = named; |
| 15 } | 16 } |
| 16 | 17 |
| 17 @Tag(named: undefined) /// 01: compile-time error | 18 @Tag(named: undefined) /// 01: compile-time error |
| 18 class A {} | 19 class A {} |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 reflectClass(A).metadata; | 64 reflectClass(A).metadata; |
| 64 checkMetadata(reflectClass(B), [const Tag(named: 'valid')]); | 65 checkMetadata(reflectClass(B), [const Tag(named: 'valid')]); |
| 65 checkMetadata(reflectClass(C), [const Tag(named: C.STATIC_FIELD)]); | 66 checkMetadata(reflectClass(C), [const Tag(named: C.STATIC_FIELD)]); |
| 66 reflectClass(D).metadata; | 67 reflectClass(D).metadata; |
| 67 reflectClass(E).metadata; | 68 reflectClass(E).metadata; |
| 68 reflectClass(F).metadata; | 69 reflectClass(F).metadata; |
| 69 reflectClass(G).metadata; | 70 reflectClass(G).metadata; |
| 70 reflectClass(H).metadata; | 71 reflectClass(H).metadata; |
| 71 reflectClass(I).metadata; | 72 reflectClass(I).metadata; |
| 72 } | 73 } |
| OLD | NEW |