| 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 analyzer.test.enum_test; | 5 library analyzer.test.enum_test; |
| 6 | 6 |
| 7 import 'dart:mirrors'; | 7 import 'dart:mirrors'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/dart/element/element.dart'; | 10 import 'package:analyzer/src/dart/element/element.dart'; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 ..check_explicit_values(); | 62 ..check_explicit_values(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void test_INIT_STATE() { | 65 void test_INIT_STATE() { |
| 66 new EnumTester<INIT_STATE>() | 66 new EnumTester<INIT_STATE>() |
| 67 ..check_getters() | 67 ..check_getters() |
| 68 ..check_explicit_values(); | 68 ..check_explicit_values(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void test_Modifier() { | 71 void test_Modifier() { |
| 72 new EnumTester<Modifier>() | 72 new EnumTester<Modifier>( |
| 73 ignoreGetters: ["persistedValues", "transientValues"]) |
| 73 ..check_getters() | 74 ..check_getters() |
| 74 ..check_explicit_values(); | 75 ..check_explicit_values(); |
| 75 } | 76 } |
| 76 | 77 |
| 77 void test_ParameterKind() { | 78 void test_ParameterKind() { |
| 78 new EnumTester<ParameterKind>() | 79 new EnumTester<ParameterKind>() |
| 79 ..check_getters() | 80 ..check_getters() |
| 80 ..check_explicit_values(); | 81 ..check_explicit_values(); |
| 81 } | 82 } |
| 82 | 83 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 201 |
| 201 // Check that the set of ordinals runs from 0 to N-1, where N is the number | 202 // Check that the set of ordinals runs from 0 to N-1, where N is the number |
| 202 // of enumerated values. | 203 // of enumerated values. |
| 203 Set<int> expectedOrdinals = new Set<int>(); | 204 Set<int> expectedOrdinals = new Set<int>(); |
| 204 for (int i = 0; i < numValues; i++) { | 205 for (int i = 0; i < numValues; i++) { |
| 205 expectedOrdinals.add(i); | 206 expectedOrdinals.add(i); |
| 206 } | 207 } |
| 207 expect(ordinals.keys.toSet(), equals(expectedOrdinals)); | 208 expect(ordinals.keys.toSet(), equals(expectedOrdinals)); |
| 208 } | 209 } |
| 209 } | 210 } |
| OLD | NEW |