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

Unified Diff: runtime/observatory/tests/service/dominator_tree_user_test.dart

Issue 2751423005: Run dartfmt on all files under runtime. (Closed)
Patch Set: Run dartfmt on all files under runtime. Created 3 years, 9 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: runtime/observatory/tests/service/dominator_tree_user_test.dart
diff --git a/runtime/observatory/tests/service/dominator_tree_user_test.dart b/runtime/observatory/tests/service/dominator_tree_user_test.dart
index c312dd0fedae06532d60378c34db65605442e1a2..e81f4705868baedc16a7a2b796235cc0c9762f32 100644
--- a/runtime/observatory/tests/service/dominator_tree_user_test.dart
+++ b/runtime/observatory/tests/service/dominator_tree_user_test.dart
@@ -10,19 +10,65 @@ import 'package:unittest/unittest.dart';
import 'test_helper.dart';
// small example from [Lenguaer & Tarjan 1979]
-class R { var x; var y; var z; }
-class A { var x; }
-class B { var x; var y; var z; }
-class C { var x; var y; }
-class D { var x; }
-class E { var x; }
-class F { var x; }
-class G { var x; var y; }
-class H { var x; var y; }
-class I { var x; }
-class J { var x; }
-class K { var x; var y; }
-class L { var x; }
+class R {
+ var x;
+ var y;
+ var z;
+}
+
+class A {
+ var x;
+}
+
+class B {
+ var x;
+ var y;
+ var z;
+}
+
+class C {
+ var x;
+ var y;
+}
+
+class D {
+ var x;
+}
+
+class E {
+ var x;
+}
+
+class F {
+ var x;
+}
+
+class G {
+ var x;
+ var y;
+}
+
+class H {
+ var x;
+ var y;
+}
+
+class I {
+ var x;
+}
+
+class J {
+ var x;
+}
+
+class K {
+ var x;
+ var y;
+}
+
+class L {
+ var x;
+}
var r;
@@ -41,50 +87,58 @@ buildGraph() {
var k = new K();
var l = new L();
- r.x = a; r.y = b; r.z = c;
+ r.x = a;
+ r.y = b;
+ r.z = c;
a.x = d;
- b.x = a; b.y = d; b.z = e;
- c.x = f; c.y = g;
+ b.x = a;
+ b.y = d;
+ b.z = e;
+ c.x = f;
+ c.y = g;
d.x = l;
e.x = h;
f.x = i;
- g.x = i; g.y = j;
- h.x = e; h.y = k;
+ g.x = i;
+ g.y = j;
+ h.x = e;
+ h.y = k;
i.x = k;
j.x = i;
- k.x = i; k.y = r;
+ k.x = i;
+ k.y = r;
l.x = h;
}
var tests = [
-(Isolate isolate) async {
- final rootLib = await isolate.rootLibrary.load();
- final raw =
- await isolate.fetchHeapSnapshot(M.HeapSnapshotRoots.user, false).last;
- final snapshot = new HeapSnapshot();
- await snapshot.loadProgress(isolate, raw).last;
-
- node(String className) {
- var cls = rootLib.classes.singleWhere((cls) => cls.name == className);
- return snapshot.graph.vertices.singleWhere((v) => v.vmCid == cls.vmCid);
- }
-
- expect(node('I').dominator, equals(node('R')));
- expect(node('K').dominator, equals(node('R')));
- expect(node('C').dominator, equals(node('R')));
- expect(node('H').dominator, equals(node('R')));
- expect(node('E').dominator, equals(node('R')));
- expect(node('A').dominator, equals(node('R')));
- expect(node('D').dominator, equals(node('R')));
- expect(node('B').dominator, equals(node('R')));
-
- expect(node('F').dominator, equals(node('C')));
- expect(node('G').dominator, equals(node('C')));
- expect(node('J').dominator, equals(node('G')));
- expect(node('L').dominator, equals(node('D')));
-
- expect(node('R'), isNotNull); // The field.
-},
+ (Isolate isolate) async {
+ final rootLib = await isolate.rootLibrary.load();
+ final raw =
+ await isolate.fetchHeapSnapshot(M.HeapSnapshotRoots.user, false).last;
+ final snapshot = new HeapSnapshot();
+ await snapshot.loadProgress(isolate, raw).last;
+
+ node(String className) {
+ var cls = rootLib.classes.singleWhere((cls) => cls.name == className);
+ return snapshot.graph.vertices.singleWhere((v) => v.vmCid == cls.vmCid);
+ }
+
+ expect(node('I').dominator, equals(node('R')));
+ expect(node('K').dominator, equals(node('R')));
+ expect(node('C').dominator, equals(node('R')));
+ expect(node('H').dominator, equals(node('R')));
+ expect(node('E').dominator, equals(node('R')));
+ expect(node('A').dominator, equals(node('R')));
+ expect(node('D').dominator, equals(node('R')));
+ expect(node('B').dominator, equals(node('R')));
+
+ expect(node('F').dominator, equals(node('C')));
+ expect(node('G').dominator, equals(node('C')));
+ expect(node('J').dominator, equals(node('G')));
+ expect(node('L').dominator, equals(node('D')));
+
+ expect(node('R'), isNotNull); // The field.
+ },
];
main(args) => runIsolateTests(args, tests, testeeBefore: buildGraph);

Powered by Google App Engine
This is Rietveld 408576698