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

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

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test 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
« no previous file with comments | « tests/compiler/dart2js/subtype_test.dart ('k') | tests/compiler/dart2js/switch_empty_default_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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]);
+ }));
}
« no previous file with comments | « tests/compiler/dart2js/subtype_test.dart ('k') | tests/compiler/dart2js/switch_empty_default_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698