src/test/preflow_test.cc
changeset 855 8c44b64dd436
parent 845 e4692f92a79b
child 858 acc83957ee4a
     1.1 --- a/src/test/preflow_test.cc	Wed Sep 15 10:34:12 2004 +0000
     1.2 +++ b/src/test/preflow_test.cc	Wed Sep 15 11:50:50 2004 +0000
     1.3 @@ -5,6 +5,9 @@
     1.4  #include <hugo/preflow.h>
     1.5  #include <hugo/skeletons/graph.h>
     1.6  #include <hugo/skeletons/maps.h>
     1.7 +
     1.8 +#include <string.h>
     1.9 +
    1.10  using namespace hugo;
    1.11  
    1.12  void check_Preflow() 
    1.13 @@ -66,7 +69,17 @@
    1.14  
    1.15    typedef Preflow<Graph, int> PType;
    1.16  
    1.17 -  std::ifstream file("preflow_graph.out");
    1.18 +  char *f_name;
    1.19 +  
    1.20 +  f_name=new char[strlen(getenv("srcdir"))+50];
    1.21 +  strcpy(f_name,getenv("srcdir"));
    1.22 +  strcat(f_name,"/preflow_graph.inp");
    1.23 +  
    1.24 +  std::ifstream file(f_name);
    1.25 +  
    1.26 +  check(file,"Input file '" << f_name << "' not found.");
    1.27 +  
    1.28 +  delete [] f_name;
    1.29    
    1.30    Graph G;
    1.31    Node s, t;