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

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

Issue 2759973004: Fix observatory tests broken by running dartfmt. Temporarily reverted formatting for evaluate_activ… (Closed)
Patch Set: 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_vm_test.dart
diff --git a/runtime/observatory/tests/service/dominator_tree_vm_test.dart b/runtime/observatory/tests/service/dominator_tree_vm_test.dart
index ceee90a1e0d74e1595084fe76002fec9c627f1d0..b78f82a676ec785c253bb6b535fd7beb13112333 100644
--- a/runtime/observatory/tests/service/dominator_tree_vm_test.dart
+++ b/runtime/observatory/tests/service/dominator_tree_vm_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.vm, 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.vm, 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);
« no previous file with comments | « runtime/observatory/tests/service/dominator_tree_user_test.dart ('k') | runtime/observatory/tests/service/echo_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698