Skip to content
Snippets Groups Projects
Commit 3fa6ffd6 authored by p-hamann's avatar p-hamann
Browse files

Add get_edge_id test

parent d2186b0b
Branches
1 merge request!9Perf optimization
......@@ -8,16 +8,18 @@
// Example 1.
TEST_CASE("GraphStructureTest") {
// Petersen Graph
std::vector<std::vector<unsigned int>> adjacencies {
{2, 3, 4}, {1, 3, 7},
{2, 4, 8}, {3, 5, 9},
{1, 4, 10}, {1, 8, 9},
{2, 9, 10}, {3, 6, 10},
{4, 6, 7}, {5, 7, 8}
{2, 3}, //1
{1, 3, 4}, //2
{1, 2}, //3
{2} //4
};
graph g = graph(adjacencies);
REQUIRE(g.num_nodes() == 10);
}
\ No newline at end of file
REQUIRE(g.num_nodes() == 4);
REQUIRE(g.get_edge_id(1,2) == g.get_edge_id(2,1));
REQUIRE(g.get_edge_id(1,3) == g.get_edge_id(3,1));
REQUIRE(g.get_edge_id(2,4) == g.get_edge_id(4,2));
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment