src/test/graph_wrapper_test.cc
author deba
Wed, 22 Sep 2004 08:04:31 +0000
changeset 897 ef09eee53b09
parent 891 74589d20dbc3
child 906 17f31d280385
permissions -rw-r--r--
The default constructors are removed from the maps.
The ArrayMap is the map structure of the graphs.
marci@849
     1
#include<iostream>
marci@849
     2
#include<hugo/smart_graph.h>
marci@849
     3
#include<hugo/skeletons/graph.h>
marci@849
     4
#include<hugo/list_graph.h>
marci@849
     5
#include<hugo/full_graph.h>
marci@849
     6
#include<hugo/graph_wrapper.h>
marci@849
     7
marci@870
     8
#include"test/test_tools.h"
marci@870
     9
#include"test/graph_test.h"
marci@849
    10
marci@849
    11
/**
marci@849
    12
\file
alpar@878
    13
This test makes consistency checks of graph wrappers.
marci@849
    14
alpar@878
    15
\todo More extensive tests are needed 
marci@849
    16
*/
marci@849
    17
marci@849
    18
using namespace hugo;
marci@849
    19
marci@849
    20
marci@849
    21
typedef SmartGraph Graph;
deba@891
    22
deba@891
    23
//Compile GraphWrapper
marci@849
    24
typedef GraphWrapper<Graph> GW;
marci@849
    25
template void checkCompileStaticGraph<GW>(GW &);
marci@849
    26
deba@891
    27
//Compile RevGraphWrapper
marci@849
    28
typedef RevGraphWrapper<Graph> RevGW;
marci@849
    29
template void checkCompileStaticGraph<RevGW>(RevGW &);
deba@891
    30
deba@891
    31
//Compile SubGraphWrapper
deba@891
    32
typedef SubGraphWrapper<Graph, Graph::NodeMap<bool>, 
deba@891
    33
			Graph::EdgeMap<bool> > SubGW;
deba@891
    34
template void checkCompileStaticGraph<SubGW>(SubGW &);
deba@891
    35
deba@891
    36
//Compile UndirGraphWrapper
deba@891
    37
/// \bug UndirGraphWrapper cannot pass the StaticGraph test
deba@891
    38
//typedef UndirGraphWrapper<Graph> UndirGW;
deba@891
    39
//template void checkCompileStaticGraph<UndirGW>(UndirGW &);
deba@891
    40
deba@891
    41
//Compile UndirGraph
deba@891
    42
//typedef UndirGraph<Graph> UndirG;
deba@891
    43
//template void checkCompileStaticGraph<UndirG>(UndirG &);
deba@891
    44
marci@892
    45
//Compile SubBidirGraphWrapper
marci@892
    46
typedef SubBidirGraphWrapper<Graph, Graph::EdgeMap<bool>, 
marci@892
    47
			     Graph::EdgeMap<bool> > SubBDGW;
marci@892
    48
template void checkCompileStaticGraph<SubBDGW>(SubBDGW &);
deba@891
    49
deba@891
    50
//Compile BidirGraphWrapper
marci@892
    51
typedef BidirGraphWrapper<Graph> BidirGW;
marci@892
    52
template void checkCompileStaticGraph<BidirGW>(BidirGW &);
deba@891
    53
deba@891
    54
//Compile BidirGraph
marci@892
    55
typedef BidirGraph<Graph> BidirG;
marci@892
    56
template void checkCompileStaticGraph<BidirG>(BidirG &);
deba@891
    57
deba@891
    58
//Compile ResGraphWrapper
marci@892
    59
typedef ResGraphWrapper<Graph, int, Graph::EdgeMap<int>, 
marci@892
    60
			Graph::EdgeMap<int> > ResGW;
marci@892
    61
template void checkCompileStaticGraph<ResGW>(ResGW &);
deba@891
    62
deba@891
    63
//Compile ErasingFirstGraphWrapper
deba@891
    64
typedef ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > ErasingFirstGW;
deba@891
    65
template void checkCompileStaticGraph<ErasingFirstGW>(ErasingFirstGW &);
marci@849
    66
marci@849
    67
marci@849
    68
int main() 
marci@849
    69
{
marci@849
    70
  std::cout << __FILE__ ": All tests passed.\n";
marci@849
    71
marci@849
    72
  return 0;
marci@849
    73
}