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 6db7b3c95bdaffa056e08439c996afe032e4e039..0000000000000000000000000000000000000000 |
--- a/runtime/observatory/test/dominator_tree_test.dart |
+++ /dev/null |
@@ -1,55 +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. |
-// VMOptions=--compile-all --error_on_bad_type --error_on_bad_override --checked |
- |
-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); |
-} |