Skip to content

Commit

Permalink
test: added function call to PrintEdge()
Browse files Browse the repository at this point in the history
  • Loading branch information
rxdu committed Oct 12, 2024
1 parent 77c3578 commit 3e8c696
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/unit_test/graph_mod_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
using namespace xmotion;

struct TestState {
TestState(uint64_t id) : id_(id){};
TestState(uint64_t id) : id_(id) {};

int64_t id_;
};
Expand Down Expand Up @@ -84,6 +84,14 @@ TEST_F(GraphModificationTest, EdgeMod) {
graph.AddEdge(nodes[0], nodes[1], 1.2);
graph.AddEdge(nodes[1], nodes[2], 1.5);

// print edges
{
auto edges = graph.GetAllEdges();
for (auto &edge : edges) {
edge->PrintEdge();
}
}

ASSERT_EQ(graph.GetTotalEdgeNumber(), 2)
<< "Failed to add directed edges to pointer-type graph";
std::vector<Graph<TestState *>::edge_iterator> edges;
Expand Down

0 comments on commit 3e8c696

Please sign in to comment.