Index: tests/compiler/dart2js/subtypeset_test.dart |
diff --git a/tests/compiler/dart2js/subtypeset_test.dart b/tests/compiler/dart2js/subtypeset_test.dart |
index 1853a8b8bd2328ed8ac0f80f1eca726e893b0317..38bac611db30b2fe7b597b90282ef7ff3a782862 100644 |
--- a/tests/compiler/dart2js/subtypeset_test.dart |
+++ b/tests/compiler/dart2js/subtypeset_test.dart |
@@ -9,13 +9,14 @@ library subtypeset_test; |
import 'package:expect/expect.dart'; |
import 'package:async_helper/async_helper.dart'; |
import 'type_test_helper.dart'; |
-import 'package:compiler/src/elements/elements.dart' |
- show Element, ClassElement; |
+import 'package:compiler/src/elements/elements.dart' show Element, ClassElement; |
import 'package:compiler/src/universe/class_set.dart'; |
import 'package:compiler/src/world.dart'; |
void main() { |
- asyncTest(() => TypeEnvironment.create(r""" |
+ asyncTest(() => TypeEnvironment |
+ .create( |
+ r""" |
/// A |
/// / \ |
/// B C |
@@ -34,7 +35,7 @@ void main() { |
class H implements C {} |
class I implements H {} |
""", |
- mainSource: r""" |
+ mainSource: r""" |
main() { |
new A(); |
new C(); |
@@ -44,38 +45,39 @@ void main() { |
new G(); |
} |
""", |
- useMockCompiler: false).then((env) { |
- World world = env.compiler.world; |
+ useMockCompiler: false) |
+ .then((env) { |
+ World world = env.compiler.world; |
- ClassElement A = env.getElement("A"); |
- ClassElement B = env.getElement("B"); |
- ClassElement C = env.getElement("C"); |
- ClassElement D = env.getElement("D"); |
- ClassElement E = env.getElement("E"); |
- ClassElement F = env.getElement("F"); |
- ClassElement G = env.getElement("G"); |
- ClassElement H = env.getElement("H"); |
- ClassElement I = env.getElement("I"); |
+ ClassElement A = env.getElement("A"); |
+ ClassElement B = env.getElement("B"); |
+ ClassElement C = env.getElement("C"); |
+ ClassElement D = env.getElement("D"); |
+ ClassElement E = env.getElement("E"); |
+ ClassElement F = env.getElement("F"); |
+ ClassElement G = env.getElement("G"); |
+ ClassElement H = env.getElement("H"); |
+ ClassElement I = env.getElement("I"); |
- void checkClass(ClassElement cls, |
- List<ClassElement> subtypes) { |
- ClassSet node = world.getClassSet(cls); |
- print('$cls:\n${node}'); |
- Expect.listEquals(subtypes, |
- node.subtypes().toList(), |
- "Unexpected subtypes of ${cls.name}:\n" |
- "Expected: $subtypes\n" |
- "Found : ${node.subtypes().toList()}"); |
- } |
+ void checkClass(ClassElement cls, List<ClassElement> subtypes) { |
+ ClassSet node = world.getClassSet(cls); |
+ print('$cls:\n${node}'); |
+ Expect.listEquals( |
+ subtypes, |
+ node.subtypes().toList(), |
+ "Unexpected subtypes of ${cls.name}:\n" |
+ "Expected: $subtypes\n" |
+ "Found : ${node.subtypes().toList()}"); |
+ } |
- checkClass(A, [A, C, E, F, G, B, D, H, I]); |
- checkClass(B, [B, D, E]); |
- checkClass(C, [C, E, F, G, H, B, D, I]); |
- checkClass(D, [D]); |
- checkClass(E, [E]); |
- checkClass(F, [F]); |
- checkClass(G, [G]); |
- checkClass(H, [H, I]); |
- checkClass(I, [I]); |
- })); |
+ checkClass(A, [A, C, E, F, G, B, D, H, I]); |
+ checkClass(B, [B, D, E]); |
+ checkClass(C, [C, E, F, G, H, B, D, I]); |
+ checkClass(D, [D]); |
+ checkClass(E, [E]); |
+ checkClass(F, [F]); |
+ checkClass(G, [G]); |
+ checkClass(H, [H, I]); |
+ checkClass(I, [I]); |
+ })); |
} |