src/test/bfs_test.cc
changeset 1283 fc20371677b9
parent 1220 20b26ee5812b
child 1359 1581f961cfaa
     1.1 --- a/src/test/bfs_test.cc	Thu Mar 31 13:30:27 2005 +0000
     1.2 +++ b/src/test/bfs_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/bfs.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 = bfs_test.predNodeMap();
    1.13    b  = bfs_test.reached(n);
    1.14  
    1.15 +  DirPath<Graph> pp(G);
    1.16 +  bfs_test.getPath(pp,n);
    1.17  }
    1.18  
    1.19  void check_Bfs_Function_Compile() 
    1.20 @@ -103,6 +106,10 @@
    1.21    
    1.22    check(bfs_test.dist(t)==3,"Bfs found a wrong path. " << bfs_test.dist(t));
    1.23  
    1.24 +  DirPath<Graph> p(G);
    1.25 +  check(bfs_test.getPath(p,t),"getPath() failed to set the path.");
    1.26 +  check(p.length()==3,"getPath() found a wrong path.");
    1.27 +  
    1.28  
    1.29    for(EdgeIt e(G); e==INVALID; ++e) {
    1.30      Node u=G.source(e);