# HG changeset patch # User alpar # Date 1094204510 0 # Node ID 9cd0aeea47b0da8b1d42dc6ce244194ea3edc34f # Parent 147eb3a58706f42ca84bb6d20b55ee4850e2af0d - BFD/DFS/Dijkstra compile test is done with skeleton::GraphSkeleton graph and skeleton::ReadMap. - 'skeleton::' is explicitely written instead of 'using namespace ...' in graph_test.cc - Output messages of type "makeRep(3)..." in unionfind_test.cc have been changed in order not to confuse compiler output parsers. diff -r 147eb3a58706 -r 9cd0aeea47b0 src/test/bfs_test.cc --- a/src/test/bfs_test.cc Thu Sep 02 17:56:40 2004 +0000 +++ b/src/test/bfs_test.cc Fri Sep 03 09:41:50 2004 +0000 @@ -1,34 +1,32 @@ #include "test_tools.h" #include #include +#include using namespace hugo; const int PET_SIZE =5; -void check_Bfs_SmartGraph_Compile() +void check_Bfs_Compile() { - typedef int VType; - typedef SmartGraph Graph; + typedef skeleton::StaticGraphSkeleton Graph; typedef Graph::Edge Edge; typedef Graph::Node Node; typedef Graph::EdgeIt EdgeIt; typedef Graph::NodeIt NodeIt; - typedef Graph::EdgeMap LengthMap; typedef Bfs BType; Graph G; Node n; Edge e; - VType l; + int l; bool b; BType::DistMap d(G); BType::PredMap p(G); BType::PredNodeMap pn(G); - LengthMap cap(G); BType bfs_test(G); diff -r 147eb3a58706 -r 9cd0aeea47b0 src/test/dfs_test.cc --- a/src/test/dfs_test.cc Thu Sep 02 17:56:40 2004 +0000 +++ b/src/test/dfs_test.cc Fri Sep 03 09:41:50 2004 +0000 @@ -1,6 +1,7 @@ #include "test_tools.h" #include #include +#include using namespace hugo; @@ -9,28 +10,25 @@ void check_Dfs_SmartGraph_Compile() { - typedef int VType; - typedef SmartGraph Graph; + typedef skeleton::StaticGraphSkeleton Graph; typedef Graph::Edge Edge; typedef Graph::Node Node; typedef Graph::EdgeIt EdgeIt; typedef Graph::NodeIt NodeIt; - typedef Graph::EdgeMap LengthMap; - typedef Dfs BType; + typedef Dfs DType; Graph G; Node n; Edge e; - VType l; + int l; bool b; - BType::DistMap d(G); - BType::PredMap p(G); - BType::PredNodeMap pn(G); - LengthMap cap(G); + DType::DistMap d(G); + DType::PredMap p(G); + DType::PredNodeMap pn(G); - BType dfs_test(G); + DType dfs_test(G); dfs_test.run(n); diff -r 147eb3a58706 -r 9cd0aeea47b0 src/test/dijkstra_test.cc --- a/src/test/dijkstra_test.cc Thu Sep 02 17:56:40 2004 +0000 +++ b/src/test/dijkstra_test.cc Fri Sep 03 09:41:50 2004 +0000 @@ -1,22 +1,23 @@ #include "test_tools.h" #include #include - +#include +#include using namespace hugo; const int PET_SIZE =5; -void check_Dijkstra_SmartGraph_BinHeap_Compile() +void check_Dijkstra_BinHeap_Compile() { typedef int VType; - typedef SmartGraph Graph; + typedef skeleton::StaticGraphSkeleton Graph; typedef Graph::Edge Edge; typedef Graph::Node Node; typedef Graph::EdgeIt EdgeIt; typedef Graph::NodeIt NodeIt; - typedef Graph::EdgeMap LengthMap; + typedef skeleton::ReadMap LengthMap; typedef Dijkstra DType; @@ -28,7 +29,7 @@ DType::DistMap d(G); DType::PredMap p(G); DType::PredNodeMap pn(G); - LengthMap cap(G); + LengthMap cap; DType dijkstra_test(G,cap); diff -r 147eb3a58706 -r 9cd0aeea47b0 src/test/graph_test.cc --- a/src/test/graph_test.cc Thu Sep 02 17:56:40 2004 +0000 +++ b/src/test/graph_test.cc Fri Sep 03 09:41:50 2004 +0000 @@ -18,7 +18,6 @@ */ using namespace hugo; -using namespace hugo::skeleton; template void checkCompileStaticGraph(Graph &G) { @@ -341,11 +340,13 @@ } //Compile GraphSkeleton -template -void checkCompileStaticGraph(StaticGraphSkeleton &); -template void checkCompile(GraphSkeleton &); -template -void checkCompileErase(EraseableGraphSkeleton &); +template void checkCompileStaticGraph +(skeleton::StaticGraphSkeleton &); + +template void checkCompile(skeleton::GraphSkeleton &); + +template void checkCompileErase +(skeleton::EraseableGraphSkeleton &); //Compile SmartGraph template void checkCompile(SmartGraph &); diff -r 147eb3a58706 -r 9cd0aeea47b0 src/test/unionfind_test.cc --- a/src/test/unionfind_test.cc Thu Sep 02 17:56:40 2004 +0000 +++ b/src/test/unionfind_test.cc Fri Sep 03 09:41:50 2004 +0000 @@ -162,13 +162,13 @@ cout << "Size of the class of 2: " << U.size(2) << endl; check(U.size(2) == 3,"Test failed."); - cout << "makeRep(4)..." << endl; + cout << "Calling makeRep(4)..." << endl; U.makeRep(4); // print(U); - cout << "makeRep(3)..." << endl; + cout << "Calling makeRep(3)..." << endl; U.makeRep(3); // print(U); - cout << "makeRep(2)..." << endl; + cout << "Calling makeRep(2)..." << endl; U.makeRep(2); // print(U);