Fixing tests, roughing in iterator

This commit is contained in:
Ian Roddis
2021-06-02 16:11:50 -03:00
parent 08f80a3113
commit 3d238df398
3 changed files with 20 additions and 8 deletions

View File

@@ -13,12 +13,10 @@ TEST_CASE("DAG Basic Tests", "[dag]") {
dag.addEdge(i-1, i);
}
dag.addEdge(5, 9);
REQUIRE(dag.shortest_path(0,9).size() == 10);
auto sp = dag.shortest_path(1,9);
std::cout << "Shortest path from 1 to 10: (";
for (auto k : sp) {
std::cout << k << " -> ";
}
std::cout << std::endl;
dag.addEdge(5, 9);
REQUIRE(dag.shortest_path(0,9).size() == 7);
REQUIRE_THROWS(dag.addEdge(9, 5));
}