src/test/heap_test.cc
changeset 1215 81b4731f8a6b
parent 1206 9c398137c2cb
child 1325 916ec8699dc3
     1.1 --- a/src/test/heap_test.cc	Fri Mar 11 18:54:18 2005 +0000
     1.2 +++ b/src/test/heap_test.cc	Wed Mar 16 07:50:20 2005 +0000
     1.3 @@ -2,6 +2,7 @@
     1.4  
     1.5  #include <iostream>
     1.6  #include <fstream>
     1.7 +#include <string>
     1.8  #include <vector>
     1.9  
    1.10  #include <lemon/concept_check.h>
    1.11 @@ -90,7 +91,15 @@
    1.12    Node start;
    1.13  
    1.14    /// \todo create own test graph
    1.15 -  std::ifstream input("dijkstra_test.lemon");
    1.16 +
    1.17 +  std::string f_name;
    1.18 +  if( getenv("srcdir") )
    1.19 +    f_name = std::string(getenv("srcdir"));
    1.20 +  else f_name = ".";
    1.21 +  f_name += "/dijkstra_test.lgf";
    1.22 +  
    1.23 +  std::ifstream input(f_name.c_str());
    1.24 +  check(input, "Input file '" << f_name << "' not found.");
    1.25    readGraph(input, graph, length, start);  
    1.26   
    1.27    {