[Lemon-commits] [lemon_svn] alpar: r1635 - hugo/trunk/src/test
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:46:42 CET 2006
Author: alpar
Date: Wed Mar 16 08:50:20 2005
New Revision: 1635
Added:
hugo/trunk/src/test/dijkstra_test.lgf
- copied unchanged from r1634, /hugo/trunk/src/test/dijkstra_test.lemon
Removed:
hugo/trunk/src/test/dijkstra_test.lemon
Modified:
hugo/trunk/src/test/heap_test.cc
hugo/trunk/src/test/preflow_test.cc
Log:
- '.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.
Modified: hugo/trunk/src/test/heap_test.cc
==============================================================================
--- hugo/trunk/src/test/heap_test.cc (original)
+++ hugo/trunk/src/test/heap_test.cc Wed Mar 16 08:50:20 2005
@@ -2,6 +2,7 @@
#include <iostream>
#include <fstream>
+#include <string>
#include <vector>
#include <lemon/concept_check.h>
@@ -90,7 +91,15 @@
Node start;
/// \todo create own test graph
- std::ifstream input("dijkstra_test.lemon");
+
+ std::string f_name;
+ if( getenv("srcdir") )
+ f_name = std::string(getenv("srcdir"));
+ else f_name = ".";
+ f_name += "/dijkstra_test.lgf";
+
+ std::ifstream input(f_name.c_str());
+ check(input, "Input file '" << f_name << "' not found.");
readGraph(input, graph, length, start);
{
Modified: hugo/trunk/src/test/preflow_test.cc
==============================================================================
--- hugo/trunk/src/test/preflow_test.cc (original)
+++ hugo/trunk/src/test/preflow_test.cc Wed Mar 16 08:50:20 2005
@@ -86,12 +86,10 @@
typedef Preflow<Graph, int> PType;
std::string f_name;
- if( getenv("srcdir") ) {
- f_name = std::string(getenv("srcdir")) + "/preflow_graph.dim";
- }
- else {
- f_name = "preflow_graph.dim";
- }
+ if( getenv("srcdir") )
+ f_name = std::string(getenv("srcdir"));
+ else f_name = ".";
+ f_name += "/preflow_graph.dim";
std::ifstream file(f_name.c_str());
More information about the Lemon-commits
mailing list