diff --git a/src/testing/graph_topology_conversion_testing.rs b/src/testing/graph_topology_conversion_testing.rs index 3c5e22c..b85c0c7 100644 --- a/src/testing/graph_topology_conversion_testing.rs +++ b/src/testing/graph_topology_conversion_testing.rs @@ -10,6 +10,7 @@ macro_rules! graph_topology_conversion_tests { ($T:ty, $U:ty) => { $crate::graph_topology_conversion_tests!(@wrap $T, $U, convert, + convert_empty, ); }; @@ -41,3 +42,22 @@ where |e| iso.edge(e), ); } + +pub fn convert_empty() +where + G::Vertex: Debug, + G::Edge: Debug, + H::Vertex: Debug, + H::Edge: Debug, +{ + let source = H::empty(); + let (graph, iso) = G::convert(&source); + fixtures::assert_isomorphic( + &source, + &graph, + &[], + |v| iso.vertex(v), + &[], + |e| iso.edge(e), + ); +}