OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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.enums; | 5 library test.enums; |
6 | 6 |
| 7 @MirrorsUsed(targets: "test.enums") |
7 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
8 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
9 import 'stringify.dart'; | 10 import 'stringify.dart'; |
10 | 11 |
11 class C {} | 12 class C {} |
12 enum Suite { CLUBS, DIAMONDS, SPADES, HEARTS } | 13 enum Suite { CLUBS, DIAMONDS, SPADES, HEARTS } |
13 | 14 |
14 main() { | 15 main() { |
15 Expect.isFalse(reflectClass(C).isEnum); | 16 Expect.isFalse(reflectClass(C).isEnum); |
16 | 17 |
(...skipping 27 matching lines...) Expand all Loading... |
44 'Variable(s(CLUBS) in s(Suite), static, final)', | 45 'Variable(s(CLUBS) in s(Suite), static, final)', |
45 'Variable(s(DIAMONDS) in s(Suite), static, final)', | 46 'Variable(s(DIAMONDS) in s(Suite), static, final)', |
46 'Variable(s(SPADES) in s(Suite), static, final)', | 47 'Variable(s(SPADES) in s(Suite), static, final)', |
47 'Variable(s(HEARTS) in s(Suite), static, final)', | 48 'Variable(s(HEARTS) in s(Suite), static, final)', |
48 'Variable(s(values) in s(Suite), static, final)', | 49 'Variable(s(values) in s(Suite), static, final)', |
49 'Method(s(hashCode) in s(Suite), getter)', | 50 'Method(s(hashCode) in s(Suite), getter)', |
50 'Method(s(toString) in s(Suite))'], | 51 'Method(s(toString) in s(Suite))'], |
51 reflectClass(Suite).declarations.values | 52 reflectClass(Suite).declarations.values |
52 .where((d) => !d.isPrivate).map(stringify)); | 53 .where((d) => !d.isPrivate).map(stringify)); |
53 } | 54 } |
OLD | NEW |