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

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

Issue 2363773005: Move closed world reasoning methods from ClassWorld to ClosedWorld. (Closed)
Patch Set: Created 4 years, 3 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/world_test.dart
diff --git a/tests/compiler/dart2js/world_test.dart b/tests/compiler/dart2js/world_test.dart
index 25ba92682df2d43ab25d86e6cc8546feb262a009..c68e05a268a00090745c5cf77b6166ece28e1ef2 100644
--- a/tests/compiler/dart2js/world_test.dart
+++ b/tests/compiler/dart2js/world_test.dart
@@ -10,7 +10,7 @@ import 'type_test_helper.dart';
import 'package:compiler/src/common.dart';
import 'package:compiler/src/elements/elements.dart' show Element, ClassElement;
import 'package:compiler/src/universe/class_set.dart';
-import 'package:compiler/src/world.dart' show ClassWorld;
+import 'package:compiler/src/world.dart' show ClosedWorld;
void main() {
asyncTest(() async {
@@ -44,7 +44,7 @@ testClassSets() async {
}
""",
useMockCompiler: false);
- ClassWorld classWorld = env.compiler.closedWorld;
+ ClosedWorld closedWorld = env.compiler.closedWorld;
ClassElement Object_ = env.getElement("Object");
ClassElement A = env.getElement("A");
@@ -105,32 +105,32 @@ testClassSets() async {
void testSubclasses(ClassElement cls, List<ClassElement> expectedClasses,
{bool exact: true}) {
- check('subclassesOf', cls, classWorld.subclassesOf(cls), expectedClasses,
+ check('subclassesOf', cls, closedWorld.subclassesOf(cls), expectedClasses,
exact: exact);
}
void testStrictSubclasses(
ClassElement cls, List<ClassElement> expectedClasses,
{bool exact: true}) {
- check('strictSubclassesOf', cls, classWorld.strictSubclassesOf(cls),
+ check('strictSubclassesOf', cls, closedWorld.strictSubclassesOf(cls),
expectedClasses,
exact: exact,
- forEach: classWorld.forEachStrictSubclassOf,
- getCount: classWorld.strictSubclassCount);
+ forEach: closedWorld.forEachStrictSubclassOf,
+ getCount: closedWorld.strictSubclassCount);
}
void testStrictSubtypes(ClassElement cls, List<ClassElement> expectedClasses,
{bool exact: true}) {
- check('strictSubtypesOf', cls, classWorld.strictSubtypesOf(cls),
+ check('strictSubtypesOf', cls, closedWorld.strictSubtypesOf(cls),
expectedClasses,
exact: exact,
- forEach: classWorld.forEachStrictSubtypeOf,
- getCount: classWorld.strictSubtypeCount);
+ forEach: closedWorld.forEachStrictSubtypeOf,
+ getCount: closedWorld.strictSubtypeCount);
}
void testMixinUses(ClassElement cls, List<ClassElement> expectedClasses,
{bool exact: true}) {
- check('mixinUsesOf', cls, classWorld.mixinUsesOf(cls), expectedClasses,
+ check('mixinUsesOf', cls, closedWorld.mixinUsesOf(cls), expectedClasses,
exact: exact);
}
@@ -234,13 +234,13 @@ testProperties() async {
}
""",
useMockCompiler: false);
- ClassWorld classWorld = env.compiler.closedWorld;
+ ClosedWorld closedWorld = env.compiler.closedWorld;
check(String name, {bool hasStrictSubtype, bool hasOnlySubclasses}) {
ClassElement cls = env.getElement(name);
- Expect.equals(hasStrictSubtype, classWorld.hasAnyStrictSubtype(cls),
+ Expect.equals(hasStrictSubtype, closedWorld.hasAnyStrictSubtype(cls),
"Unexpected hasAnyStrictSubtype property on $cls.");
- Expect.equals(hasOnlySubclasses, classWorld.hasOnlySubclasses(cls),
+ Expect.equals(hasOnlySubclasses, closedWorld.hasOnlySubclasses(cls),
"Unexpected hasOnlySubclasses property on $cls.");
}
« pkg/compiler/lib/src/world.dart ('K') | « tests/compiler/dart2js/type_mask2_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698