diff --git a/test/dfs_test.cc b/test/dfs_test.cc --- a/test/dfs_test.cc +++ b/test/dfs_test.cc @@ -20,7 +20,6 @@ #include #include #include - #include #include @@ -88,14 +87,30 @@ typedef Digraph::Node Node; Digraph g; - dfs(g,Node()).run(); - dfs(g).source(Node()).run(); + bool b; + dfs(g).run(Node()); + b=dfs(g).run(Node(),Node()); + dfs(g).run(); dfs(g) - .predMap(concepts::WriteMap()) - .distMap(concepts::WriteMap()) + .predMap(concepts::ReadWriteMap()) + .distMap(concepts::ReadWriteMap()) .reachedMap(concepts::ReadWriteMap()) .processedMap(concepts::WriteMap()) .run(Node()); + b=dfs(g) + .predMap(concepts::ReadWriteMap()) + .distMap(concepts::ReadWriteMap()) + .reachedMap(concepts::ReadWriteMap()) + .processedMap(concepts::WriteMap()) + .path(concepts::Path()) + .dist(VType()) + .run(Node(),Node()); + dfs(g) + .predMap(concepts::ReadWriteMap()) + .distMap(concepts::ReadWriteMap()) + .reachedMap(concepts::ReadWriteMap()) + .processedMap(concepts::WriteMap()) + .run(); } template @@ -129,10 +144,15 @@ check(u==dfs_test.predNode(v),"Wrong tree."); check(dfs_test.dist(v) - dfs_test.dist(u) == 1, "Wrong distance. (" << dfs_test.dist(u) << "->" - < myPredMap; + dfs(G).predMap(myPredMap).run(s); + } } int main()