# HG changeset patch # User alpar # Date 1083913070 0 # Node ID efaa79ee8d1486b7a70b9702a05d059a3538e7c2 # Parent 14355e502338224e203f3bc3ed4e7f1880ada9ec time_measure.cc was renamed to time_measure_test.cc Add an alternative dijsktra_test.cc diff -r 14355e502338 -r efaa79ee8d14 doc/Doxyfile --- a/doc/Doxyfile Fri May 07 06:35:02 2004 +0000 +++ b/doc/Doxyfile Fri May 07 06:57:50 2004 +0000 @@ -399,7 +399,8 @@ ../src/work/alpar/list_graph.h \ ../src/work/athos/minlengthpaths.h \ ../src/work/klao/path.h \ - ../src/work/jacint/max_flow.h + ../src/work/jacint/max_flow.h \ + ../src/test/test_tools.h # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp diff -r 14355e502338 -r efaa79ee8d14 src/test/Makefile.am --- a/src/test/Makefile.am Fri May 07 06:35:02 2004 +0000 +++ b/src/test/Makefile.am Fri May 07 06:57:50 2004 +0000 @@ -1,9 +1,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/src -check_PROGRAMS = graph_test time_measure +check_PROGRAMS = graph_test dijkstra_test time_measure_test TESTS = $(check_PROGRAMS) XFAIL_TESTS = -graph_test_SOURCES = graph_test.cc -time_measure_SOURCES = time_measure.cc \ No newline at end of file +graph_test_SOURCES = graph_test.cc test_tools.h +dijkstra_test_SOURCES = dijkstra_test.cc test_tools.h +time_measure_test_SOURCES = time_measure_test.cc \ No newline at end of file diff -r 14355e502338 -r efaa79ee8d14 src/test/graph_test.cc --- a/src/test/graph_test.cc Fri May 07 06:35:02 2004 +0000 +++ b/src/test/graph_test.cc Fri May 07 06:57:50 2004 +0000 @@ -1,6 +1,8 @@ #include #include #include +#include"test_tools.h" + //#include<../work/alpar/list_graph.h> /* @@ -12,20 +14,6 @@ using namespace hugo; -// void check(bool rc, const char *msg) { -// if(!rc) { -// std::cerr << msg << std::endl; -// exit(1); -// } -// } - -#define check(rc, msg) \ - if(!rc) { \ - std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \ - exit(1); \ - } else { } \ - - template void checkCompile(Graph &G) { typedef typename Graph::Node Node; @@ -172,31 +160,6 @@ } -template struct PetNodes -{ - std::vector outer, inner; - std::vector outcir, incir, cons; -}; - -template PetNodes addPetersen(Graph &G,int num=5) -{ - //std::vector outer, inner; - - PetNodes n; - - for(int i=0;i void checkNodeList(Graph &G, int nn) { typename Graph::NodeIt n(G); diff -r 14355e502338 -r efaa79ee8d14 src/test/time_measure.cc --- a/src/test/time_measure.cc Fri May 07 06:35:02 2004 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -#include - -///\file \brief Test cases for time_measure.h -/// -///\todo To be extended - - -using namespace hugo; - -int main() -{ - int j=0; - Timer T; - for(int i=0;i++;i<100) j+=2; - std::cout << T << '\n'; - T.reset(); - for(int i=0;i++;i<100) j+=2; - std::cout << T << '\n'; - - return 0; -} diff -r 14355e502338 -r efaa79ee8d14 src/test/time_measure_test.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/test/time_measure_test.cc Fri May 07 06:57:50 2004 +0000 @@ -0,0 +1,21 @@ +#include + +///\file \brief Test cases for time_measure.h +/// +///\todo To be extended + + +using namespace hugo; + +int main() +{ + int j=0; + Timer T; + for(int i=0;i<100;i++) j+=2; + std::cout << T << '\n'; + T.reset(); + for(int i=0;i<100;i++) j+=2; + std::cout << T << '\n'; + + return 0; +}