| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import 'dart:mirrors'; | 7 import 'dart:mirrors'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/element.dart'; | 9 import 'package:analyzer/src/generated/element.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 | 27 |
| 28 @ReflectiveTestCase() | 28 @ReflectiveTestCase() |
| 29 class EnumTest { | 29 class EnumTest { |
| 30 void test_AnalysisLevel() { | 30 void test_AnalysisLevel() { |
| 31 new EnumTester<AnalysisLevel>() | 31 new EnumTester<AnalysisLevel>() |
| 32 ..check_getters() | 32 ..check_getters() |
| 33 ..check_explicit_values(); | 33 ..check_explicit_values(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void test_AngularPropertyKind() { | |
| 37 new EnumTester<AngularPropertyKind>() | |
| 38 ..check_getters() | |
| 39 ..check_explicit_values(); | |
| 40 } | |
| 41 | |
| 42 void test_AssignmentKind() { | 36 void test_AssignmentKind() { |
| 43 new EnumTester<AssignmentKind>() | 37 new EnumTester<AssignmentKind>() |
| 44 ..check_getters() | 38 ..check_getters() |
| 45 ..check_explicit_values(); | 39 ..check_explicit_values(); |
| 46 } | 40 } |
| 47 | 41 |
| 48 void test_CacheState() { | 42 void test_CacheState() { |
| 49 new EnumTester<CacheState>() | 43 new EnumTester<CacheState>() |
| 50 ..check_getters() | 44 ..check_getters() |
| 51 ..check_explicit_values(); | 45 ..check_explicit_values(); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 232 |
| 239 // Check that the set of ordinals runs from 0 to N-1, where N is the number | 233 // Check that the set of ordinals runs from 0 to N-1, where N is the number |
| 240 // of enumerated values. | 234 // of enumerated values. |
| 241 Set<int> expectedOrdinals = new Set<int>(); | 235 Set<int> expectedOrdinals = new Set<int>(); |
| 242 for (int i = 0; i < numValues; i++) { | 236 for (int i = 0; i < numValues; i++) { |
| 243 expectedOrdinals.add(i); | 237 expectedOrdinals.add(i); |
| 244 } | 238 } |
| 245 expect(ordinals.keys.toSet(), equals(expectedOrdinals)); | 239 expect(ordinals.keys.toSet(), equals(expectedOrdinals)); |
| 246 } | 240 } |
| 247 } | 241 } |
| OLD | NEW |