src/test/dfs_test.cc
changeset 1283 fc20371677b9
parent 1233 f3d856bf1ebf
child 1359 1581f961cfaa
     1.1 --- a/src/test/dfs_test.cc	Thu Mar 31 13:30:27 2005 +0000
     1.2 +++ b/src/test/dfs_test.cc	Thu Mar 31 13:31:39 2005 +0000
     1.3 @@ -17,6 +17,7 @@
     1.4  #include "test_tools.h"
     1.5  #include <lemon/smart_graph.h>
     1.6  #include <lemon/dfs.h>
     1.7 +#include <lemon/path.h>
     1.8  #include <lemon/concept/graph.h>
     1.9  
    1.10  using namespace lemon;
    1.11 @@ -56,6 +57,8 @@
    1.12    //  pn = dfs_test.predNodeMap();
    1.13    b  = dfs_test.reached(n);
    1.14  
    1.15 +  DirPath<Graph> pp(G);
    1.16 +  dfs_test.getPath(pp,n);
    1.17  }
    1.18  
    1.19  
    1.20 @@ -102,6 +105,10 @@
    1.21    Dfs<Graph> dfs_test(G);
    1.22    dfs_test.run(s);  
    1.23    
    1.24 +  DirPath<Graph> p(G);
    1.25 +  check(dfs_test.getPath(p,t),"getPath() failed to set the path.");
    1.26 +  check(p.length()==dfs_test.dist(t),"getPath() found a wrong path.");
    1.27 +  
    1.28    for(NodeIt v(G); v!=INVALID; ++v) {
    1.29      check(dfs_test.reached(v),"Each node should be reached.");
    1.30      if ( dfs_test.pred(v)!=INVALID ) {