()
| 50 | |
| 51 | #[test] |
| 52 | fn dfs() { |
| 53 | let graph = create_graph(TINY_G); |
| 54 | let dfs = DepthFirstSearch::new(graph.as_ref(), 0); |
| 55 | assert_ne!(dfs.count(), graph.V()); |
| 56 | assert!(vec![1, 2, 3, 4, 5, 6].iter().all(|&w| dfs.marked(w))); |
| 57 | assert!(vec![7, 8, 9, 10, 11, 12].iter().all(|&w| !dfs.marked(w))); |
| 58 | } |
| 59 | |
| 60 | #[test] |
| 61 | fn non_recursive_dfs() { |
nothing calls this directly
no test coverage detected