Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1623)

Unified Diff: tests/compiler/dart2js/class_set_test.dart

Issue 1568213003: Add EnumSet. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/class_set_test.dart
diff --git a/tests/compiler/dart2js/class_set_test.dart b/tests/compiler/dart2js/class_set_test.dart
index ad69d0b50e61943740c6462ded08c640bf6f33e2..d88745d2c781e34da05b4ef450be9ab90010525b 100644
--- a/tests/compiler/dart2js/class_set_test.dart
+++ b/tests/compiler/dart2js/class_set_test.dart
@@ -12,6 +12,7 @@ import 'type_test_helper.dart';
import 'package:compiler/src/elements/elements.dart'
show Element, ClassElement;
import 'package:compiler/src/universe/class_set.dart';
+import 'package:compiler/src/util/enumset.dart';
import 'package:compiler/src/util/util.dart';
import 'package:compiler/src/world.dart';
@@ -131,7 +132,8 @@ void main() {
}
iterator = new ClassHierarchyNodeIterable(
- world.getClassHierarchyNode(G)).iterator;
+ world.getClassHierarchyNode(G),
+ ClassHierarchyNode.ALL).iterator;
checkState(G, currentNode: null, stack: null);
Expect.isNull(iterator.current);
Expect.isTrue(iterator.moveNext());
@@ -143,6 +145,7 @@ void main() {
iterator = new ClassHierarchyNodeIterable(
world.getClassHierarchyNode(G),
+ ClassHierarchyNode.ALL,
includeRoot: false).iterator;
checkState(G, currentNode: null, stack: null);
Expect.isNull(iterator.current);
@@ -151,7 +154,8 @@ void main() {
Expect.isNull(iterator.current);
iterator = new ClassHierarchyNodeIterable(
- world.getClassHierarchyNode(C)).iterator;
+ world.getClassHierarchyNode(C),
+ ClassHierarchyNode.ALL).iterator;
checkState(C, currentNode: null, stack: null);
Expect.isNull(iterator.current);
Expect.isTrue(iterator.moveNext());
@@ -171,7 +175,8 @@ void main() {
Expect.isNull(iterator.current);
iterator = new ClassHierarchyNodeIterable(
- world.getClassHierarchyNode(D)).iterator;
+ world.getClassHierarchyNode(D),
+ ClassHierarchyNode.ALL).iterator;
checkState(D, currentNode: null, stack: null);
Expect.isNull(iterator.current);
Expect.isTrue(iterator.moveNext());
@@ -182,7 +187,8 @@ void main() {
Expect.isNull(iterator.current);
iterator = new ClassHierarchyNodeIterable(
- world.getClassHierarchyNode(B)).iterator;
+ world.getClassHierarchyNode(B),
+ ClassHierarchyNode.ALL).iterator;
checkState(B, currentNode: null, stack: null);
Expect.isNull(iterator.current);
Expect.isTrue(iterator.moveNext());
@@ -197,6 +203,7 @@ void main() {
iterator = new ClassHierarchyNodeIterable(
world.getClassHierarchyNode(B),
+ ClassHierarchyNode.ALL,
includeRoot: false).iterator;
checkState(B, currentNode: null, stack: null);
Expect.isNull(iterator.current);
@@ -209,7 +216,9 @@ void main() {
iterator = new ClassHierarchyNodeIterable(
world.getClassHierarchyNode(B),
- includeIndirectlyInstantiated: false).iterator;
+ new EnumSet<Instantiation>.fromValues(<Instantiation>[
+ Instantiation.DIRECTLY_INSTANTIATED,
+ Instantiation.UNINSTANTIATED])).iterator;
checkState(B, currentNode: null, stack: null);
Expect.isNull(iterator.current);
Expect.isTrue(iterator.moveNext());
@@ -220,7 +229,8 @@ void main() {
Expect.isNull(iterator.current);
iterator = new ClassHierarchyNodeIterable(
- world.getClassHierarchyNode(A)).iterator;
+ world.getClassHierarchyNode(A),
+ ClassHierarchyNode.ALL).iterator;
checkState(A, currentNode: null, stack: null);
Expect.isNull(iterator.current);
Expect.isTrue(iterator.moveNext());
@@ -250,6 +260,7 @@ void main() {
iterator = new ClassHierarchyNodeIterable(
world.getClassHierarchyNode(A),
+ ClassHierarchyNode.ALL,
includeRoot: false).iterator;
checkState(A, currentNode: null, stack: null);
Expect.isNull(iterator.current);
@@ -277,7 +288,9 @@ void main() {
iterator = new ClassHierarchyNodeIterable(
world.getClassHierarchyNode(A),
- includeIndirectlyInstantiated: false).iterator;
+ new EnumSet<Instantiation>.fromValues(<Instantiation>[
+ Instantiation.DIRECTLY_INSTANTIATED,
+ Instantiation.UNINSTANTIATED])).iterator;
checkState(A, currentNode: null, stack: null);
Expect.isNull(iterator.current);
Expect.isTrue(iterator.moveNext());
@@ -304,8 +317,10 @@ void main() {
iterator = new ClassHierarchyNodeIterable(
world.getClassHierarchyNode(A),
- includeRoot: false,
- includeIndirectlyInstantiated: false).iterator;
+ new EnumSet<Instantiation>.fromValues(<Instantiation>[
+ Instantiation.DIRECTLY_INSTANTIATED,
+ Instantiation.UNINSTANTIATED]),
+ includeRoot: false).iterator;
checkState(A, currentNode: null, stack: null);
Expect.isNull(iterator.current);
Expect.isTrue(iterator.moveNext());
@@ -328,3 +343,4 @@ void main() {
Expect.isNull(iterator.current);
}));
}
+

Powered by Google App Engine
This is Rietveld 408576698