src/test/graph_wrapper_test.cc
author alpar
Tue, 05 Oct 2004 09:41:05 +0000
changeset 938 70e2886211d5
parent 933 1b7c88fbb950
child 946 c94ef40a22ce
permissions -rw-r--r--
Many of ckeckCompileXYZ()'s are now in the corresponding skeleton headers.
(Tests for Symmetric Graphs are still to be moved)
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;
alpar@938
    41
template void lemon::skeleton::checkCompileStaticGraph<GW>(GW &);
marci@849
    42
deba@891
    43
//Compile RevGraphWrapper
marci@849
    44
typedef RevGraphWrapper<Graph> RevGW;
alpar@938
    45
template void lemon::skeleton::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;
alpar@938
    50
template void lemon::skeleton::checkCompileStaticGraph<SubGW>(SubGW &);
deba@891
    51
marci@933
    52
//Compile NodeSubGraphWrapper
marci@933
    53
typedef NodeSubGraphWrapper<Graph, Graph::NodeMap<bool> > NodeSubGW;
alpar@938
    54
template void lemon::skeleton::checkCompileStaticGraph<NodeSubGW>(NodeSubGW &);
marci@933
    55
marci@933
    56
//Compile EdgeSubGraphWrapper
marci@933
    57
typedef EdgeSubGraphWrapper<Graph, Graph::EdgeMap<bool> > EdgeSubGW;
alpar@938
    58
template void lemon::skeleton::checkCompileStaticGraph<EdgeSubGW>(EdgeSubGW &);
marci@933
    59
deba@891
    60
//Compile UndirGraphWrapper
deba@891
    61
/// \bug UndirGraphWrapper cannot pass the StaticGraph test
deba@891
    62
//typedef UndirGraphWrapper<Graph> UndirGW;
deba@891
    63
//template void checkCompileStaticGraph<UndirGW>(UndirGW &);
deba@891
    64
deba@891
    65
//Compile UndirGraph
deba@891
    66
//typedef UndirGraph<Graph> UndirG;
deba@891
    67
//template void checkCompileStaticGraph<UndirG>(UndirG &);
deba@891
    68
marci@892
    69
//Compile SubBidirGraphWrapper
marci@892
    70
typedef SubBidirGraphWrapper<Graph, Graph::EdgeMap<bool>, 
marci@892
    71
			     Graph::EdgeMap<bool> > SubBDGW;
alpar@938
    72
template void lemon::skeleton::checkCompileStaticGraph<SubBDGW>(SubBDGW &);
deba@891
    73
deba@891
    74
//Compile BidirGraphWrapper
marci@892
    75
typedef BidirGraphWrapper<Graph> BidirGW;
alpar@938
    76
template void lemon::skeleton::checkCompileStaticGraph<BidirGW>(BidirGW &);
deba@891
    77
deba@891
    78
//Compile BidirGraph
marci@892
    79
typedef BidirGraph<Graph> BidirG;
alpar@938
    80
template void lemon::skeleton::checkCompileStaticGraph<BidirG>(BidirG &);
deba@891
    81
deba@891
    82
//Compile ResGraphWrapper
marci@892
    83
typedef ResGraphWrapper<Graph, int, Graph::EdgeMap<int>, 
marci@892
    84
			Graph::EdgeMap<int> > ResGW;
alpar@938
    85
template void lemon::skeleton::checkCompileStaticGraph<ResGW>(ResGW &);
deba@891
    86
deba@891
    87
//Compile ErasingFirstGraphWrapper
deba@891
    88
typedef ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > ErasingFirstGW;
alpar@938
    89
template
alpar@938
    90
void lemon::skeleton::checkCompileStaticGraph<ErasingFirstGW>(ErasingFirstGW &);
marci@849
    91
marci@849
    92
marci@849
    93
int main() 
marci@849
    94
{
marci@849
    95
  std::cout << __FILE__ ": All tests passed.\n";
marci@849
    96
marci@849
    97
  return 0;
marci@849
    98
}