1.1 --- a/src/test/bfs_test.cc Wed Sep 01 09:04:07 2004 +0000
1.2 +++ b/src/test/bfs_test.cc Wed Sep 01 15:08:41 2004 +0000
1.3 @@ -76,14 +76,17 @@
1.4 "Wrong output.");
1.5 }
1.6
1.7 - ///\bug This works only for integer lengths
1.8 - for(NodeIt v(G); v==INVALID; ++v)
1.9 - if ( bfs_test.reached(v) ) {
1.10 + for(NodeIt v(G); v==INVALID; ++v) {
1.11 + check(bfs_test.reached(v),"Each node should be reached.");
1.12 + if ( bfs_test.pred(v)!=INVALID ) {
1.13 Edge e=bfs_test.pred(v);
1.14 Node u=G.tail(e);
1.15 + check(u==bfs_test.predNode(v),"Wrong tree.");
1.16 check(bfs_test.dist(v) - bfs_test.dist(u) == 1,
1.17 - "Bad shortest path tree edge! Difference: "
1.18 + "Wrong distance. Difference: "
1.19 << std::abs(bfs_test.dist(v) - bfs_test.dist(u)
1.20 - 1));
1.21 }
1.22 + }
1.23 }
1.24 +