| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 ..check_getters() | 92 ..check_getters() |
| 93 ..check_explicit_values(); | 93 ..check_explicit_values(); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void test_RedirectingConstructorKind() { | 96 void test_RedirectingConstructorKind() { |
| 97 new EnumTester<RedirectingConstructorKind>() | 97 new EnumTester<RedirectingConstructorKind>() |
| 98 ..check_getters() | 98 ..check_getters() |
| 99 ..check_explicit_values(); | 99 ..check_explicit_values(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void test_RetentionPriority() { | |
| 103 new EnumTester<RetentionPriority>() | |
| 104 ..check_getters() | |
| 105 ..check_explicit_values(); | |
| 106 } | |
| 107 | |
| 108 void test_SourceKind() { | 102 void test_SourceKind() { |
| 109 new EnumTester<SourceKind>() | 103 new EnumTester<SourceKind>() |
| 110 ..check_getters() | 104 ..check_getters() |
| 111 ..check_explicit_values(); | 105 ..check_explicit_values(); |
| 112 } | 106 } |
| 113 | 107 |
| 114 void test_SourcePriority() { | |
| 115 new EnumTester<SourcePriority>() | |
| 116 ..check_getters() | |
| 117 ..check_explicit_values(); | |
| 118 } | |
| 119 | |
| 120 void test_UriKind() { | 108 void test_UriKind() { |
| 121 new EnumTester<UriKind>() | 109 new EnumTester<UriKind>() |
| 122 ..check_getters() | 110 ..check_getters() |
| 123 ..check_explicit_values(); | 111 ..check_explicit_values(); |
| 124 } | 112 } |
| 125 | 113 |
| 126 void test_WrapperKind() { | 114 void test_WrapperKind() { |
| 127 new EnumTester<WrapperKind>() | 115 new EnumTester<WrapperKind>() |
| 128 ..check_getters() | 116 ..check_getters() |
| 129 ..check_explicit_values(); | 117 ..check_explicit_values(); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 219 |
| 232 // Check that the set of ordinals runs from 0 to N-1, where N is the number | 220 // Check that the set of ordinals runs from 0 to N-1, where N is the number |
| 233 // of enumerated values. | 221 // of enumerated values. |
| 234 Set<int> expectedOrdinals = new Set<int>(); | 222 Set<int> expectedOrdinals = new Set<int>(); |
| 235 for (int i = 0; i < numValues; i++) { | 223 for (int i = 0; i < numValues; i++) { |
| 236 expectedOrdinals.add(i); | 224 expectedOrdinals.add(i); |
| 237 } | 225 } |
| 238 expect(ordinals.keys.toSet(), equals(expectedOrdinals)); | 226 expect(ordinals.keys.toSet(), equals(expectedOrdinals)); |
| 239 } | 227 } |
| 240 } | 228 } |
| OLD | NEW |