1.1 --- a/test/dfs_test.cc Tue Sep 21 06:19:04 2010 +0200
1.2 +++ b/test/dfs_test.cc Wed Sep 22 09:24:07 2010 +0200
1.3 @@ -50,7 +50,10 @@
1.4 "6 3 7\n"
1.5 "@attributes\n"
1.6 "source 0\n"
1.7 - "target 5\n";
1.8 + "target 5\n"
1.9 + "source1 6\n"
1.10 + "target1 3\n";
1.11 +
1.12
1.13 void checkDfsCompile()
1.14 {
1.15 @@ -144,11 +147,14 @@
1.16
1.17 Digraph G;
1.18 Node s, t;
1.19 + Node s1, t1;
1.20
1.21 std::istringstream input(test_lgf);
1.22 digraphReader(G, input).
1.23 node("source", s).
1.24 node("target", t).
1.25 + node("source1", s1).
1.26 + node("target1", t1).
1.27 run();
1.28
1.29 Dfs<Digraph> dfs_test(G);
1.30 @@ -175,6 +181,11 @@
1.31 }
1.32
1.33 {
1.34 + Dfs<Digraph> dfs(G);
1.35 + check(dfs.run(s1,t1) && dfs.reached(t1),"Node 3 is reachable from Node 6.");
1.36 + }
1.37 +
1.38 + {
1.39 NullMap<Node,Arc> myPredMap;
1.40 dfs(G).predMap(myPredMap).run(s);
1.41 }