COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/test/graph_wrapper_test.cc @ 933:1b7c88fbb950

Last change on this file since 933:1b7c88fbb950 was 933:1b7c88fbb950, checked in by marci, 20 years ago

NodeSubGraphWrapper?, test, and ducumentation modifications.

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