From 1b79809e2f429359c5bc065f2b1370e5f3b9c3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Fri, 31 Jul 2026 09:33:26 +0200 Subject: [PATCH] Remove deprecated method calls from map tests --- src/testing/maps_testing.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/testing/maps_testing.rs b/src/testing/maps_testing.rs index fb0788f..61ce663 100644 --- a/src/testing/maps_testing.rs +++ b/src/testing/maps_testing.rs @@ -48,7 +48,7 @@ macro_rules! vertex_map_tests { } #[test] - fn sync_expands_to_new_vertices() { + fn expand_to_new_vertices() { use $crate::traits::GraphTopology; let mut graph = <$T>::new(); graph.add_vertex(); @@ -59,21 +59,21 @@ macro_rules! vertex_map_tests { } assert!( map.capacity() < graph.vertex_capacity(), - "precondition: map is stale before sync" + "precondition: map is stale before expand" ); - map.sync(&graph); + map.expand(graph.vertex_capacity()); assert_eq!(map.capacity(), graph.vertex_capacity()); } #[test] - fn sync_does_not_overwrite_existing_values() { + fn expand_does_not_overwrite_existing_values() { use $crate::traits::GraphTopology; let mut graph = <$T>::new(); let v = graph.add_vertex(); let mut map = graph.vertex_map(0); map[v] = 5; graph.add_vertex(); - map.sync(&graph); + map.expand(graph.vertex_capacity()); assert_eq!(map[v], 5); } }; @@ -174,7 +174,7 @@ macro_rules! edge_map_tests { } #[test] - fn sync_expands_to_new_edges() { + fn expand_to_new_edges() { use $crate::traits::GraphTopology; let mut graph = <$T>::new(); let v1 = graph.add_vertex(); @@ -187,14 +187,14 @@ macro_rules! edge_map_tests { } assert!( map.capacity() < graph.edge_capacity(), - "precondition: map is stale before sync" + "precondition: map is stale before expand" ); - map.sync(&graph); + map.expand(graph.edge_capacity()); assert_eq!(map.capacity(), graph.edge_capacity()); } #[test] - fn sync_does_not_overwrite_existing_values() { + fn expand_does_not_overwrite_existing_values() { use $crate::traits::GraphTopology; let mut graph = <$T>::new(); let v1 = graph.add_vertex(); @@ -203,7 +203,7 @@ macro_rules! edge_map_tests { let mut map = graph.edge_map(0); map[e] = 5; graph.add_edge(v1, v2); - map.sync(&graph); + map.expand(graph.edge_capacity()); assert_eq!(map[e], 5); } };