COIN-OR::LEMON - Graph Library

Changeset 1215:81b4731f8a6b in lemon-0.x for src


Ignore:
Timestamp:
03/16/05 08:50:20 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1635
Message:
  • '.lgf' could be the standard 'lemon graph format' extension.
  • heap_test is fixed in order that 'make discheck' work.
  • heap_test now checks whether the input file exists.
Location:
src/test
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • src/test/heap_test.cc

    r1206 r1215  
    33#include <iostream>
    44#include <fstream>
     5#include <string>
    56#include <vector>
    67
     
    9192
    9293  /// \todo create own test graph
    93   std::ifstream input("dijkstra_test.lemon");
     94
     95  std::string f_name;
     96  if( getenv("srcdir") )
     97    f_name = std::string(getenv("srcdir"));
     98  else f_name = ".";
     99  f_name += "/dijkstra_test.lgf";
     100 
     101  std::ifstream input(f_name.c_str());
     102  check(input, "Input file '" << f_name << "' not found.");
    94103  readGraph(input, graph, length, start); 
    95104 
  • src/test/preflow_test.cc

    r1164 r1215  
    8787
    8888  std::string f_name;
    89   if( getenv("srcdir") ) {
    90     f_name = std::string(getenv("srcdir")) + "/preflow_graph.dim";
    91   }
    92   else {
    93     f_name = "preflow_graph.dim";
    94   }
     89  if( getenv("srcdir") )
     90    f_name = std::string(getenv("srcdir"));
     91  else f_name = ".";
     92  f_name += "/preflow_graph.dim";
    9593 
    9694  std::ifstream file(f_name.c_str());
Note: See TracChangeset for help on using the changeset viewer.