COIN-OR::LEMON - Graph Library

Changeset 793:9cd0aeea47b0 in lemon-0.x for src/test


Ignore:
Timestamp:
09/03/04 11:41:50 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1087
Message:
  • 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.
Location:
src/test
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/test/bfs_test.cc

    r780 r793  
    22#include <hugo/smart_graph.h>
    33#include <hugo/bfs.h>
     4#include<hugo/skeletons/graph.h>
    45
    56using namespace hugo;
     
    89
    910
    10 void check_Bfs_SmartGraph_Compile()
     11void check_Bfs_Compile()
    1112{
    12   typedef int VType;
    13   typedef SmartGraph Graph;
     13  typedef skeleton::StaticGraphSkeleton Graph;
    1414
    1515  typedef Graph::Edge Edge;
     
    1717  typedef Graph::EdgeIt EdgeIt;
    1818  typedef Graph::NodeIt NodeIt;
    19   typedef Graph::EdgeMap<VType> LengthMap;
    2019 
    2120  typedef Bfs<Graph> BType;
     
    2423  Node n;
    2524  Edge e;
    26   VType l;
     25  int l;
    2726  bool b;
    2827  BType::DistMap d(G);
    2928  BType::PredMap p(G);
    3029  BType::PredNodeMap pn(G);
    31   LengthMap cap(G);
    3230 
    3331  BType bfs_test(G);
  • src/test/dfs_test.cc

    r780 r793  
    22#include <hugo/smart_graph.h>
    33#include <hugo/dfs.h>
     4#include<hugo/skeletons/graph.h>
    45
    56using namespace hugo;
     
    1011void check_Dfs_SmartGraph_Compile()
    1112{
    12   typedef int VType;
    13   typedef SmartGraph Graph;
     13  typedef skeleton::StaticGraphSkeleton Graph;
    1414
    1515  typedef Graph::Edge Edge;
     
    1717  typedef Graph::EdgeIt EdgeIt;
    1818  typedef Graph::NodeIt NodeIt;
    19   typedef Graph::EdgeMap<VType> LengthMap;
    2019 
    21   typedef Dfs<Graph> BType;
     20  typedef Dfs<Graph> DType;
    2221 
    2322  Graph G;
    2423  Node n;
    2524  Edge e;
    26   VType l;
     25  int l;
    2726  bool b;
    28   BType::DistMap d(G);
    29   BType::PredMap p(G);
    30   BType::PredNodeMap pn(G);
    31   LengthMap cap(G);
     27  DType::DistMap d(G);
     28  DType::PredMap p(G);
     29  DType::PredNodeMap pn(G);
    3230 
    33   BType dfs_test(G);
     31  DType dfs_test(G);
    3432 
    3533  dfs_test.run(n);
  • src/test/dijkstra_test.cc

    r780 r793  
    22#include <hugo/smart_graph.h>
    33#include <hugo/dijkstra.h>
    4 
     4#include<hugo/skeletons/graph.h>
     5#include<hugo/skeletons/maps.h>
    56using namespace hugo;
    67
     
    89
    910
    10 void check_Dijkstra_SmartGraph_BinHeap_Compile()
     11void check_Dijkstra_BinHeap_Compile()
    1112{
    1213  typedef int VType;
    13   typedef SmartGraph Graph;
     14  typedef skeleton::StaticGraphSkeleton Graph;
    1415
    1516  typedef Graph::Edge Edge;
     
    1718  typedef Graph::EdgeIt EdgeIt;
    1819  typedef Graph::NodeIt NodeIt;
    19   typedef Graph::EdgeMap<VType> LengthMap;
     20  typedef skeleton::ReadMap<Edge,VType> LengthMap;
    2021 
    2122  typedef Dijkstra<Graph, LengthMap> DType;
     
    2930  DType::PredMap p(G);
    3031  DType::PredNodeMap pn(G);
    31   LengthMap cap(G);
     32  LengthMap cap;
    3233
    3334  DType dijkstra_test(G,cap);
  • src/test/graph_test.cc

    r787 r793  
    1919
    2020using namespace hugo;
    21 using namespace hugo::skeleton;
    2221
    2322template<class Graph> void checkCompileStaticGraph(Graph &G)
     
    342341
    343342//Compile GraphSkeleton
    344 template
    345 void checkCompileStaticGraph<StaticGraphSkeleton>(StaticGraphSkeleton &);
    346 template void checkCompile<GraphSkeleton>(GraphSkeleton &);
    347 template
    348 void checkCompileErase<EraseableGraphSkeleton>(EraseableGraphSkeleton &);
     343template void checkCompileStaticGraph<skeleton::StaticGraphSkeleton>
     344(skeleton::StaticGraphSkeleton &);
     345
     346template void checkCompile<skeleton::GraphSkeleton>(skeleton::GraphSkeleton &);
     347
     348template void checkCompileErase<skeleton::EraseableGraphSkeleton>
     349(skeleton::EraseableGraphSkeleton &);
    349350
    350351//Compile SmartGraph
  • src/test/unionfind_test.cc

    r774 r793  
    163163  check(U.size(2) == 3,"Test failed.");
    164164
    165   cout << "makeRep(4)..." << endl;
     165  cout << "Calling makeRep(4)..." << endl;
    166166  U.makeRep(4);
    167167//   print(U);
    168   cout << "makeRep(3)..." << endl;
     168  cout << "Calling makeRep(3)..." << endl;
    169169  U.makeRep(3);
    170170//   print(U);
    171   cout << "makeRep(2)..." << endl;
     171  cout << "Calling makeRep(2)..." << endl;
    172172  U.makeRep(2);
    173173//   print(U);
Note: See TracChangeset for help on using the changeset viewer.