src/test/graph_wrapper_test.cc
author marci
Wed, 29 Sep 2004 19:02:26 +0000
changeset 923 acbef5dd0e65
parent 906 17f31d280385
child 933 1b7c88fbb950
permissions -rw-r--r--
more docs
alpar@906
     1
/* -*- C++ -*-
alpar@921
     2
 * src/test/graph_wrapper_test.cc - Part of LEMON, a generic C++ optimization library
alpar@906
     3
 *
alpar@906
     4
 * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@906
     5
 * (Egervary Combinatorial Optimization Research Group, EGRES).
alpar@906
     6
 *
alpar@906
     7
 * Permission to use, modify and distribute this software is granted
alpar@906
     8
 * provided that this copyright notice appears in all copies. For
alpar@906
     9
 * precise terms see the accompanying LICENSE file.
alpar@906
    10
 *
alpar@906
    11
 * This software is provided "AS IS" with no warranty of any kind,
alpar@906
    12
 * express or implied, and with no claim as to its suitability for any
alpar@906
    13
 * purpose.
alpar@906
    14
 *
alpar@906
    15
 */
alpar@906
    16
marci@849
    17
#include<iostream>
alpar@921
    18
#include<lemon/smart_graph.h>
alpar@921
    19
#include<lemon/skeletons/graph.h>
alpar@921
    20
#include<lemon/list_graph.h>
alpar@921
    21
#include<lemon/full_graph.h>
alpar@921
    22
#include<lemon/graph_wrapper.h>
marci@849
    23
marci@870
    24
#include"test/test_tools.h"
marci@870
    25
#include"test/graph_test.h"
marci@849
    26
marci@849
    27
/**
marci@849
    28
\file
alpar@878
    29
This test makes consistency checks of graph wrappers.
marci@849
    30
alpar@878
    31
\todo More extensive tests are needed 
marci@849
    32
*/
marci@849
    33
alpar@921
    34
using namespace lemon;
marci@849
    35
marci@849
    36
marci@849
    37
typedef SmartGraph Graph;
deba@891
    38
deba@891
    39
//Compile GraphWrapper
marci@849
    40
typedef GraphWrapper<Graph> GW;
marci@849
    41
template void checkCompileStaticGraph<GW>(GW &);
marci@849
    42
deba@891
    43
//Compile RevGraphWrapper
marci@849
    44
typedef RevGraphWrapper<Graph> RevGW;
marci@849
    45
template void checkCompileStaticGraph<RevGW>(RevGW &);
deba@891
    46
deba@891
    47
//Compile SubGraphWrapper
deba@891
    48
typedef SubGraphWrapper<Graph, Graph::NodeMap<bool>, 
deba@891
    49
			Graph::EdgeMap<bool> > SubGW;
deba@891
    50
template void checkCompileStaticGraph<SubGW>(SubGW &);
deba@891
    51
deba@891
    52
//Compile UndirGraphWrapper
deba@891
    53
/// \bug UndirGraphWrapper cannot pass the StaticGraph test
deba@891
    54
//typedef UndirGraphWrapper<Graph> UndirGW;
deba@891
    55
//template void checkCompileStaticGraph<UndirGW>(UndirGW &);
deba@891
    56
deba@891
    57
//Compile UndirGraph
deba@891
    58
//typedef UndirGraph<Graph> UndirG;
deba@891
    59
//template void checkCompileStaticGraph<UndirG>(UndirG &);
deba@891
    60
marci@892
    61
//Compile SubBidirGraphWrapper
marci@892
    62
typedef SubBidirGraphWrapper<Graph, Graph::EdgeMap<bool>, 
marci@892
    63
			     Graph::EdgeMap<bool> > SubBDGW;
marci@892
    64
template void checkCompileStaticGraph<SubBDGW>(SubBDGW &);
deba@891
    65
deba@891
    66
//Compile BidirGraphWrapper
marci@892
    67
typedef BidirGraphWrapper<Graph> BidirGW;
marci@892
    68
template void checkCompileStaticGraph<BidirGW>(BidirGW &);
deba@891
    69
deba@891
    70
//Compile BidirGraph
marci@892
    71
typedef BidirGraph<Graph> BidirG;
marci@892
    72
template void checkCompileStaticGraph<BidirG>(BidirG &);
deba@891
    73
deba@891
    74
//Compile ResGraphWrapper
marci@892
    75
typedef ResGraphWrapper<Graph, int, Graph::EdgeMap<int>, 
marci@892
    76
			Graph::EdgeMap<int> > ResGW;
marci@892
    77
template void checkCompileStaticGraph<ResGW>(ResGW &);
deba@891
    78
deba@891
    79
//Compile ErasingFirstGraphWrapper
deba@891
    80
typedef ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > ErasingFirstGW;
deba@891
    81
template void checkCompileStaticGraph<ErasingFirstGW>(ErasingFirstGW &);
marci@849
    82
marci@849
    83
marci@849
    84
int main() 
marci@849
    85
{
marci@849
    86
  std::cout << __FILE__ ": All tests passed.\n";
marci@849
    87
marci@849
    88
  return 0;
marci@849
    89
}