Change all graph tests to pub to avoid unused-warnings
This commit is contained in:
@@ -30,7 +30,7 @@ macro_rules! graph_topology_addition_tests {
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) fn reserve_vertices_increases_capacity<G: GraphTopologyAddition>() {
|
||||
pub fn reserve_vertices_increases_capacity<G: GraphTopologyAddition>() {
|
||||
let mut graph = G::default();
|
||||
let capacity_before = graph.vertex_capacity();
|
||||
graph.reserve_vertices(capacity_before + 10);
|
||||
@@ -40,7 +40,7 @@ pub(crate) fn reserve_vertices_increases_capacity<G: GraphTopologyAddition>() {
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn reserve_vertices_prevents_reallocation_on_add<G: GraphTopologyAddition>() {
|
||||
pub fn reserve_vertices_prevents_reallocation_on_add<G: GraphTopologyAddition>() {
|
||||
let mut graph = G::default();
|
||||
graph.reserve_vertices(10);
|
||||
let capacity_before = graph.vertex_capacity();
|
||||
@@ -54,7 +54,7 @@ pub(crate) fn reserve_vertices_prevents_reallocation_on_add<G: GraphTopologyAddi
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn reserve_vertices_does_not_affect_edge_capacity<G: GraphTopologyAddition>() {
|
||||
pub fn reserve_vertices_does_not_affect_edge_capacity<G: GraphTopologyAddition>() {
|
||||
let mut graph = G::default();
|
||||
let capacity_before = graph.edge_capacity();
|
||||
graph.reserve_vertices(10);
|
||||
@@ -65,7 +65,7 @@ pub(crate) fn reserve_vertices_does_not_affect_edge_capacity<G: GraphTopologyAdd
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn reserve_edges_increases_capacity<G: GraphTopologyAddition>() {
|
||||
pub fn reserve_edges_increases_capacity<G: GraphTopologyAddition>() {
|
||||
let mut graph = G::default();
|
||||
let capacity_before = graph.edge_capacity();
|
||||
graph.reserve_edges(capacity_before + 10);
|
||||
@@ -75,7 +75,7 @@ pub(crate) fn reserve_edges_increases_capacity<G: GraphTopologyAddition>() {
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn reserve_edges_prevents_reallocation_on_add<G: GraphTopologyAddition>() {
|
||||
pub fn reserve_edges_prevents_reallocation_on_add<G: GraphTopologyAddition>() {
|
||||
let mut graph = G::default();
|
||||
let v1 = graph.add_vertex();
|
||||
let v2 = graph.add_vertex();
|
||||
@@ -91,7 +91,7 @@ pub(crate) fn reserve_edges_prevents_reallocation_on_add<G: GraphTopologyAdditio
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn reserve_edges_does_not_affect_vertex_capacity<G: GraphTopologyAddition>() {
|
||||
pub fn reserve_edges_does_not_affect_vertex_capacity<G: GraphTopologyAddition>() {
|
||||
let mut graph = G::default();
|
||||
let capacity_before = graph.vertex_capacity();
|
||||
graph.reserve_edges(10);
|
||||
@@ -102,7 +102,7 @@ pub(crate) fn reserve_edges_does_not_affect_vertex_capacity<G: GraphTopologyAddi
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn add_vertex<G: GraphTopologyAddition>()
|
||||
pub fn add_vertex<G: GraphTopologyAddition>()
|
||||
where
|
||||
G::Vertex: Debug,
|
||||
{
|
||||
@@ -111,7 +111,7 @@ where
|
||||
assert_ne!(graph.add_vertex(), v, "unexpected duplicate vertex");
|
||||
}
|
||||
|
||||
pub(crate) fn add_edge<G: GraphTopologyAddition>()
|
||||
pub fn add_edge<G: GraphTopologyAddition>()
|
||||
where
|
||||
G::Edge: Debug,
|
||||
{
|
||||
@@ -122,7 +122,7 @@ where
|
||||
assert_ne!(graph.add_edge(v1, v2), e, "unexpected duplicate edge");
|
||||
}
|
||||
|
||||
pub(crate) fn vertex_map_new_vertex<G: GraphTopologyAddition>() {
|
||||
pub fn vertex_map_new_vertex<G: GraphTopologyAddition>() {
|
||||
let mut graph = G::default();
|
||||
let mut map = graph.vertex_map(27);
|
||||
let v = graph.add_vertex();
|
||||
@@ -137,7 +137,7 @@ pub(crate) fn vertex_map_new_vertex<G: GraphTopologyAddition>() {
|
||||
);
|
||||
}
|
||||
|
||||
pub(crate) fn edge_map_new_edge<G: GraphTopologyAddition>() {
|
||||
pub fn edge_map_new_edge<G: GraphTopologyAddition>() {
|
||||
let mut graph = G::default();
|
||||
let v1 = graph.add_vertex();
|
||||
let v2 = graph.add_vertex();
|
||||
@@ -150,3 +150,4 @@ pub(crate) fn edge_map_new_edge<G: GraphTopologyAddition>() {
|
||||
"unexpected value from map read after write for new edge"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user