diff -r de428ebb47ab -r 1937b6455b7d test/dfs_test.cc --- a/test/dfs_test.cc Sun Sep 12 08:32:46 2010 +0200 +++ b/test/dfs_test.cc Wed Sep 22 09:38:23 2010 +0200 @@ -50,7 +50,10 @@ "6 3 7\n" "@attributes\n" "source 0\n" - "target 5\n"; + "target 5\n" + "source1 6\n" + "target1 3\n"; + void checkDfsCompile() { @@ -179,11 +182,14 @@ Digraph G; Node s, t; + Node s1, t1; std::istringstream input(test_lgf); digraphReader(G, input). node("source", s). node("target", t). + node("source1", s1). + node("target1", t1). run(); Dfs dfs_test(G); @@ -210,6 +216,11 @@ } { + Dfs dfs(G); + check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6."); + } + + { NullMap myPredMap; dfs(G).predMap(myPredMap).run(s); }