Changeset 858:acc83957ee4a in lemon-0.x for src/test/preflow_test.cc
- Timestamp:
- 09/15/04 16:25:44 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1158
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/test/preflow_test.cc
r855 r858 1 1 #include <fstream> 2 #include <string> 3 2 4 #include "test_tools.h" 3 5 #include <hugo/smart_graph.h> … … 6 8 #include <hugo/skeletons/graph.h> 7 9 #include <hugo/skeletons/maps.h> 8 9 #include <string.h>10 10 11 11 using namespace hugo; … … 70 70 typedef Preflow<Graph, int> PType; 71 71 72 char *f_name; 72 string f_name; 73 if( getenv("srcdir") ) { 74 f_name = string(getenv("srcdir")) + "/preflow_graph.inp"; 75 } 76 else { 77 f_name = "preflow_graph.inp"; 78 } 73 79 74 f_name=new char[strlen(getenv("srcdir"))+50]; 75 strcpy(f_name,getenv("srcdir")); 76 strcat(f_name,"/preflow_graph.inp"); 80 std::ifstream file(f_name.c_str()); 77 81 78 std::ifstream file(f_name); 79 80 check(file,"Input file '" << f_name << "' not found."); 81 82 delete [] f_name; 82 check(file, "Input file '" << f_name << "' not found."); 83 83 84 84 Graph G; … … 181 181 "The max flow value or the three min cut values are incorrect."); 182 182 } 183 184 185
Note: See TracChangeset
for help on using the changeset viewer.