Fixing bfs test (Ticket #128)
authorBalazs Dezso <deba@inf.elte.hu>
Thu, 17 Jul 2008 17:39:53 +0200
changeset 222f9a18c21dba8
parent 221 64613d8fae28
child 226 4c9d85f5dc93
child 330 34e185734b42
Fixing bfs test (Ticket #128)
test/bfs_test.cc
     1.1 --- a/test/bfs_test.cc	Tue Jul 15 18:49:30 2008 +0100
     1.2 +++ b/test/bfs_test.cc	Thu Jul 17 17:39:53 2008 +0200
     1.3 @@ -97,15 +97,15 @@
     1.4    check(pathTarget(G, p) == t,"path() found a wrong path.");
     1.5  
     1.6  
     1.7 -  for(ArcIt e(G); e==INVALID; ++e) {
     1.8 +  for(ArcIt e(G); e!=INVALID; ++e) {
     1.9      Node u=G.source(e);
    1.10      Node v=G.target(e);
    1.11      check( !bfs_test.reached(u) ||
    1.12 -           (bfs_test.dist(v) > bfs_test.dist(u)+1),
    1.13 +           (bfs_test.dist(v) <= bfs_test.dist(u)+1),
    1.14             "Wrong output.");
    1.15    }
    1.16  
    1.17 -  for(NodeIt v(G); v==INVALID; ++v) {
    1.18 +  for(NodeIt v(G); v!=INVALID; ++v) {
    1.19      check(bfs_test.reached(v),"Each node should be reached.");
    1.20      if ( bfs_test.predArc(v)!=INVALID ) {
    1.21        Arc e=bfs_test.predArc(v);