From 505d1ca2601fc84d9d7d04d741e791e6bb54c775 Mon Sep 17 00:00:00 2001 From: Arnaud Becheler <8360330+Becheler@users.noreply.github.com> Date: Mon, 22 Jun 2026 13:02:23 +0200 Subject: [PATCH] fix: remove dead test variables --- test/csr_graph_test.cpp | 12 ------------ test/graph.cpp | 5 +---- test/property_iter.cpp | 3 +-- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/test/csr_graph_test.cpp b/test/csr_graph_test.cpp index 5e58e83c5..2bf426331 100644 --- a/test/csr_graph_test.cpp +++ b/test/csr_graph_test.cpp @@ -321,18 +321,6 @@ template < typename OrigGraph > void graph_test(const OrigGraph& g) { BOOST_TEST(source(*oei, g2) == *vi); } - - // Find a vertex for testing - CSRGraphT::vertex_descriptor test_vertex - = vertex(num_vertices(g2) / 2, g2); - int edge_count = 0; - CSRGraphT::out_edge_iterator oei2, oei2_end; - for (boost::tie(oei2, oei_end) = out_edges(*vi, g2); oei2 != oei_end; - ++oei2) - { - if (target(*oei2, g2) == test_vertex) - ++edge_count; - } } // Run brandes_betweenness_centrality, which touches on a whole lot diff --git a/test/graph.cpp b/test/graph.cpp index 614fb463c..596c3a7d6 100644 --- a/test/graph.cpp +++ b/test/graph.cpp @@ -156,7 +156,7 @@ template < class Graph > std::size_t count_edges(Graph& g) int main(int, char*[]) { int ret = 0; - std::size_t N = 5, E = 0; + std::size_t N = 5; std::size_t old_N; typedef ::Graph Graph; @@ -218,7 +218,6 @@ int main(int, char*[]) ret = -1; break; } - ++E; } // remove_edge(u, v, g) @@ -235,7 +234,6 @@ int main(int, char*[]) Edge e = random_edge(g, gen); boost::tie(a, b) = boost::incident(e, g); - --E; #if VERBOSE cerr << "remove_edge(" << vertex_id_map[a] << "," << vertex_id_map[b] << ")" << endl; @@ -278,7 +276,6 @@ int main(int, char*[]) Vertex a, b; Edge e = random_edge(g, gen); boost::tie(a, b) = boost::incident(e, g); - --E; #if VERBOSE cerr << "remove_edge(" << vertex_id_map[a] << "," << vertex_id_map[b] << ")" << endl; diff --git a/test/property_iter.cpp b/test/property_iter.cpp index 7b0872ec2..09a116db0 100644 --- a/test/property_iter.cpp +++ b/test/property_iter.cpp @@ -60,7 +60,7 @@ using std::find; int main(int, char*[]) { int ret = 0; - std::size_t N = 5, E = 0; + std::size_t N = 5; typedef ::Graph Graph; Graph g; @@ -114,7 +114,6 @@ int main(int, char*[]) std::cout << "finished printing" << std::endl; #endif } - ++E; } typedef boost::graph_property_iter_range< Graph, vertex_id_t >::iterator