Index: runtime/observatory/test/dominator_tree_test.dart |
diff --git a/runtime/observatory/test/dominator_tree_test.dart b/runtime/observatory/test/dominator_tree_test.dart |
deleted file mode 100644 |
index 0bd52b3a4f59a0cc53b9576c5cf3efb8bfc40f41..0000000000000000000000000000000000000000 |
--- a/runtime/observatory/test/dominator_tree_test.dart |
+++ /dev/null |
@@ -1,54 +0,0 @@ |
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
- |
-import 'package:observatory/dominator_tree.dart'; |
-import 'package:unittest/unittest.dart'; |
- |
-void main() { |
- test('small example from [Lenguaer & Tarjan 1979]', smallTest); |
- test('non-flowgraph', nonFlowgraph); |
-} |
- |
-void smallTest() { |
- var g = { |
- 'R': ['A', 'B', 'C'], |
- 'A': ['D'], |
- 'B': ['A', 'D', 'E'], |
- 'C': ['F', 'G'], |
- 'D': ['L'], |
- 'E': ['H'], |
- 'F': ['I'], |
- 'G': ['I', 'J'], |
- 'H': ['E', 'K'], |
- 'I': ['K'], |
- 'J': ['I'], |
- 'K': ['I', 'R'], |
- 'L': ['H'], |
- }; |
- var d = new Dominator(); |
- for (String u in g.keys) { |
- d.addEdges(u, g[u]); |
- } |
- d.computeDominatorTree('R'); |
- expect(d.dominator('I'), equals('R')); |
- expect(d.dominator('K'), equals('R')); |
- expect(d.dominator('C'), equals('R')); |
- expect(d.dominator('H'), equals('R')); |
- expect(d.dominator('E'), equals('R')); |
- expect(d.dominator('A'), equals('R')); |
- expect(d.dominator('D'), equals('R')); |
- expect(d.dominator('B'), equals('R')); |
- |
- expect(d.dominator('F'), equals('C')); |
- expect(d.dominator('G'), equals('C')); |
- expect(d.dominator('J'), equals('G')); |
- expect(d.dominator('L'), equals('D')); |
- expect(d.dominator('R'), isNull); |
-} |
- |
-void nonFlowgraph() { |
- var d = new Dominator(); |
- d.addEdges('A', ['B']); |
- expect(() => d.computeDominatorTree('B'), throwsStateError); |
-} |