master > master: code-rust - debugging im Alg

This commit is contained in:
RD
2022-04-14 05:01:30 +02:00
parent d0099eb7f9
commit c17ba0fefb
2 changed files with 34 additions and 24 deletions

View File

@@ -63,9 +63,9 @@ fn fixture_graph3() -> graph::Graph<i32> {
#[case(fixture_graph2(), vec![vec![1], vec![6], vec![7], vec![2,3,4,5]])]
#[case(fixture_graph3(), vec![vec![1,2,3,4,5], vec![7], vec![6,8]])]
fn test_tarjan<T>(#[case] gph: graph::Graph<T>, #[case] expected: Vec<Vec<T>>)
where T: Eq + Hash + Clone + Display
where T: Eq + Hash + Clone + Copy + Display
{
let components = tarjan::tarjan_algorithm(&gph);
let components = tarjan::tarjan_algorithm(&gph, false);
assert_components_eq(&components, &expected)
}