diff --git a/src/testing/bfs_testing.rs b/src/testing/bfs_testing.rs index 7d49f92..532d289 100644 --- a/src/testing/bfs_testing.rs +++ b/src/testing/bfs_testing.rs @@ -187,7 +187,8 @@ macro_rules! bfs_tests { assert!( found == vertices[7] || found == vertices[8], "unexpected nearest match vertex {found:?}, should be {:?} or {:?}", - vertices[7], vertices[8] + vertices[7], + vertices[8] ); } diff --git a/src/testing/dfs_testing.rs b/src/testing/dfs_testing.rs index 255445d..205f020 100644 --- a/src/testing/dfs_testing.rs +++ b/src/testing/dfs_testing.rs @@ -157,7 +157,8 @@ macro_rules! dfs_tests { assert_eq!( $crate::algorithms::dfs_find_where(&graph, vertices[0], |v| v == vertices[9]), Some(vertices[9]), - "expected to find connected vertex"); + "expected to find connected vertex" + ); } fn assert_dfs_visited( @@ -190,7 +191,10 @@ macro_rules! dfs_tests { for i in 1..10 { let v = vertices[i]; let p = predecessors[v].expect(&format!("vertex {v:?} should have a predecessor")); - assert!(visited[p], "predecessor {p:?} of vertex {v:?} should be visited"); + assert!( + visited[p], + "predecessor {p:?} of vertex {v:?} should be visited" + ); assert!( graph.are_adjacent(v, p), "predecessor {p:?} of vertex {v:?} should be adjacent"