src/test/graph_test.cc
changeset 567 efaa79ee8d14
parent 564 f84611a14a33
child 578 159f1cbf8a45
     1.1 --- a/src/test/graph_test.cc	Fri May 07 06:35:02 2004 +0000
     1.2 +++ b/src/test/graph_test.cc	Fri May 07 06:57:50 2004 +0000
     1.3 @@ -1,6 +1,8 @@
     1.4  #include<iostream>
     1.5  #include<hugo/smart_graph.h>
     1.6  #include<hugo/skeletons/graph.h>
     1.7 +#include"test_tools.h"
     1.8 +
     1.9  //#include<../work/alpar/list_graph.h>
    1.10  
    1.11  /*
    1.12 @@ -12,20 +14,6 @@
    1.13  
    1.14  using namespace hugo;
    1.15  
    1.16 -// void check(bool rc, const char *msg) {
    1.17 -//   if(!rc) {
    1.18 -//     std::cerr << msg << std::endl;
    1.19 -//     exit(1);
    1.20 -//   }
    1.21 -// }
    1.22 -
    1.23 -#define check(rc, msg) \
    1.24 -  if(!rc) { \
    1.25 -    std::cerr << __FILE__ ":" << __LINE__ << ": error: " << msg << std::endl; \
    1.26 -    exit(1); \
    1.27 -  } else { } \
    1.28 -
    1.29 -
    1.30  template<class Graph> void checkCompile(Graph &G) 
    1.31  {
    1.32    typedef typename Graph::Node Node;
    1.33 @@ -172,31 +160,6 @@
    1.34    
    1.35  }
    1.36  
    1.37 -template<class Graph> struct PetNodes
    1.38 -{
    1.39 -  std::vector<typename Graph::Node> outer, inner;
    1.40 -  std::vector<typename Graph::Edge> outcir, incir, cons;
    1.41 -};
    1.42 -
    1.43 -template<class Graph> PetNodes<Graph> addPetersen(Graph &G,int num=5)
    1.44 -{
    1.45 -  //std::vector<typename Graph::Node> outer, inner;
    1.46 -  
    1.47 -  PetNodes<Graph> n;
    1.48 -
    1.49 -  for(int i=0;i<num;i++) {
    1.50 -    n.outer.push_back(G.addNode());
    1.51 -    n.inner.push_back(G.addNode());
    1.52 -  }
    1.53 -
    1.54 - for(int i=0;i<num;i++) {
    1.55 -   n.cons.push_back(G.addEdge(n.outer[i],n.inner[i]));
    1.56 -   n.outcir.push_back(G.addEdge(n.outer[i],n.outer[(i+1)%5]));
    1.57 -   n.incir.push_back(G.addEdge(n.inner[i],n.inner[(i+2)%5]));
    1.58 -  }
    1.59 - return n;
    1.60 -}
    1.61 -
    1.62  template<class Graph> void checkNodeList(Graph &G, int nn)
    1.63  {
    1.64    typename Graph::NodeIt n(G);