COIN-OR::LEMON - Graph Library

Ticket #128: f9a18c21dba8.patch

File f9a18c21dba8.patch, 990 bytes (added by Balazs Dezso, 14 years ago)
  • test/bfs_test.cc

    # HG changeset patch
    # User Balazs Dezso <deba@inf.elte.hu>
    # Date 1216309193 -7200
    # Node ID f9a18c21dba8e82cc2919b1fdc70dbed7c057037
    # Parent  64613d8fae28170445e6dd92cdd82b8168c86874
    Fixing bfs test (Ticket #128)
    
    diff -r 64613d8fae28 -r f9a18c21dba8 test/bfs_test.cc
    a b  
    9797  check(pathTarget(G, p) == t,"path() found a wrong path.");
    9898
    9999
    100   for(ArcIt e(G); e==INVALID; ++e) {
     100  for(ArcIt e(G); e!=INVALID; ++e) {
    101101    Node u=G.source(e);
    102102    Node v=G.target(e);
    103103    check( !bfs_test.reached(u) ||
    104            (bfs_test.dist(v) > bfs_test.dist(u)+1),
     104           (bfs_test.dist(v) <= bfs_test.dist(u)+1),
    105105           "Wrong output.");
    106106  }
    107107
    108   for(NodeIt v(G); v==INVALID; ++v) {
     108  for(NodeIt v(G); v!=INVALID; ++v) {
    109109    check(bfs_test.reached(v),"Each node should be reached.");
    110110    if ( bfs_test.predArc(v)!=INVALID ) {
    111111      Arc e=bfs_test.predArc(v);