# HG changeset patch # User Balazs Dezso # Date 2008-07-17 17:39:53 # Node ID f9a18c21dba8e82cc2919b1fdc70dbed7c057037 # Parent 64613d8fae28170445e6dd92cdd82b8168c86874 Fixing bfs test (Ticket #128) diff --git a/test/bfs_test.cc b/test/bfs_test.cc --- a/test/bfs_test.cc +++ b/test/bfs_test.cc @@ -97,15 +97,15 @@ check(pathTarget(G, p) == t,"path() found a wrong path."); - for(ArcIt e(G); e==INVALID; ++e) { + for(ArcIt e(G); e!=INVALID; ++e) { Node u=G.source(e); Node v=G.target(e); check( !bfs_test.reached(u) || - (bfs_test.dist(v) > bfs_test.dist(u)+1), + (bfs_test.dist(v) <= bfs_test.dist(u)+1), "Wrong output."); } - for(NodeIt v(G); v==INVALID; ++v) { + for(NodeIt v(G); v!=INVALID; ++v) { check(bfs_test.reached(v),"Each node should be reached."); if ( bfs_test.predArc(v)!=INVALID ) { Arc e=bfs_test.predArc(v);