]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc_data_structures/control_flow_graph/dominators/test.rs
New upstream version 1.14.0+dfsg1
[rustc.git] / src / librustc_data_structures / control_flow_graph / dominators / test.rs
index a6db5f2fe3ea1bdfbc58bbcd2042afc730bf3759..0af878cac2df1d23f0706aab4b0693aa22293b39 100644 (file)
@@ -14,12 +14,7 @@ use super::*;
 
 #[test]
 fn diamond() {
-    let graph = TestGraph::new(0, &[
-        (0, 1),
-        (0, 2),
-        (1, 3),
-        (2, 3),
-    ]);
+    let graph = TestGraph::new(0, &[(0, 1), (0, 2), (1, 3), (2, 3)]);
 
     let dominators = dominators(&graph);
     let immediate_dominators = dominators.all_immediate_dominators();
@@ -32,17 +27,9 @@ fn diamond() {
 #[test]
 fn paper() {
     // example from the paper:
-    let graph = TestGraph::new(6, &[
-        (6, 5),
-        (6, 4),
-        (5, 1),
-        (4, 2),
-        (4, 3),
-        (1, 2),
-        (2, 3),
-        (3, 2),
-        (2, 1),
-    ]);
+    let graph = TestGraph::new(6,
+                               &[(6, 5), (6, 4), (5, 1), (4, 2), (4, 3), (1, 2), (2, 3), (3, 2),
+                                 (2, 1)]);
 
     let dominators = dominators(&graph);
     let immediate_dominators = dominators.all_immediate_dominators();
@@ -54,4 +41,3 @@ fn paper() {
     assert_eq!(immediate_dominators[5], Some(6));
     assert_eq!(immediate_dominators[6], Some(6));
 }
-