COIN-OR::LEMON - Graph Library

Changeset 855:8c44b64dd436 in lemon-0.x for src


Ignore:
Timestamp:
09/15/04 13:50:50 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1155
Message:

Better handling of the input files of the tests.

Location:
src/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/test/Makefile.am

    r845 r855  
    11AM_CPPFLAGS = -I$(top_srcdir)/src
    22
    3 #dist_noinst_DATA = preflow_graph
    4 EXTRA_DIST = preflow_graph.inp
    5 CLEANFILES = preflow_graph.out
     3EXTRA_DIST = preflow_graph.inp #input file for preflow_test.cc
    64
    75noinst_HEADERS = test_tools.h graph_test.h
     
    2422        xy_test
    2523
    26 SUFFIXES = .inp .out
    27 .inp.out:
    28         -cp $< $@
    29 
    3024TESTS = $(check_PROGRAMS)
    3125XFAIL_TESTS = test_tools_fail
     
    4135path_test_SOURCES = path_test.cc
    4236preflow_test_SOURCES = preflow_test.cc
    43 preflow_test_DEPENDENCIES = preflow_graph.out
    4437time_measure_test_SOURCES = time_measure_test.cc
    4538test_tools_fail_SOURCES = test_tools_fail.cc
  • src/test/preflow_test.cc

    r845 r855  
    66#include <hugo/skeletons/graph.h>
    77#include <hugo/skeletons/maps.h>
     8
     9#include <string.h>
     10
    811using namespace hugo;
    912
     
    6770  typedef Preflow<Graph, int> PType;
    6871
    69   std::ifstream file("preflow_graph.out");
     72  char *f_name;
     73 
     74  f_name=new char[strlen(getenv("srcdir"))+50];
     75  strcpy(f_name,getenv("srcdir"));
     76  strcat(f_name,"/preflow_graph.inp");
     77 
     78  std::ifstream file(f_name);
     79 
     80  check(file,"Input file '" << f_name << "' not found.");
     81 
     82  delete [] f_name;
    7083 
    7184  Graph G;
Note: See TracChangeset for help on using the changeset viewer.