| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 enumset.test; | 5 library enumset.test; |
| 6 | 6 |
| 7 import 'package:compiler/src/util/enumset.dart'; | 7 import 'package:compiler/src/util/enumset.dart'; |
| 8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
| 9 | 9 |
| 10 enum Enum { | 10 enum Enum { A, B, C, D, E, F, } |
| 11 A, | |
| 12 B, | |
| 13 C, | |
| 14 D, | |
| 15 E, | |
| 16 F, | |
| 17 } | |
| 18 | 11 |
| 19 main() { | 12 main() { |
| 20 testAddRemoveContains(); | 13 testAddRemoveContains(); |
| 21 testConstructorsIntersects(); | 14 testConstructorsIntersects(); |
| 22 } | 15 } |
| 23 | 16 |
| 24 void checkEnumSet(EnumSet<Enum> enumSet, int expectedValue, | 17 void checkEnumSet(EnumSet<Enum> enumSet, int expectedValue, |
| 25 List<Enum> expectedValues, String expectedToString) { | 18 List<Enum> expectedValues, String expectedToString) { |
| 26 Expect.equals(expectedValue, enumSet.value, | 19 Expect.equals(expectedValue, enumSet.value, |
| 27 "Unexpected EnumSet.value for ${enumSet.iterable(Enum.values)}"); | 20 "Unexpected EnumSet.value for ${enumSet.iterable(Enum.values)}"); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 137 |
| 145 checkIntersects(emptyA, singleA, false); | 138 checkIntersects(emptyA, singleA, false); |
| 146 checkIntersects(emptyA, multiA, false); | 139 checkIntersects(emptyA, multiA, false); |
| 147 checkIntersects(emptyA, multi2, false); | 140 checkIntersects(emptyA, multi2, false); |
| 148 | 141 |
| 149 checkIntersects(singleA, multiA, false); | 142 checkIntersects(singleA, multiA, false); |
| 150 checkIntersects(singleA, multi2, true); | 143 checkIntersects(singleA, multi2, true); |
| 151 | 144 |
| 152 checkIntersects(multiA, multi2, true); | 145 checkIntersects(multiA, multi2, true); |
| 153 } | 146 } |
| OLD | NEW |