2 * src/test/graph_wrapper_test.cc - Part of LEMON, a generic C++ optimization library
4 * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
5 * (Egervary Combinatorial Optimization Research Group, EGRES).
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.
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
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>
24 #include"test/test_tools.h"
25 #include"test/graph_test.h"
29 This test makes consistency checks of graph wrappers.
31 \todo More extensive tests are needed
34 using namespace lemon;
37 typedef SmartGraph Graph;
39 //Compile GraphWrapper
40 typedef GraphWrapper<Graph> GW;
41 template void checkCompileStaticGraph<GW>(GW &);
43 //Compile RevGraphWrapper
44 typedef RevGraphWrapper<Graph> RevGW;
45 template void checkCompileStaticGraph<RevGW>(RevGW &);
47 //Compile SubGraphWrapper
48 typedef SubGraphWrapper<Graph, Graph::NodeMap<bool>,
49 Graph::EdgeMap<bool> > SubGW;
50 template void checkCompileStaticGraph<SubGW>(SubGW &);
52 //Compile UndirGraphWrapper
53 /// \bug UndirGraphWrapper cannot pass the StaticGraph test
54 //typedef UndirGraphWrapper<Graph> UndirGW;
55 //template void checkCompileStaticGraph<UndirGW>(UndirGW &);
58 //typedef UndirGraph<Graph> UndirG;
59 //template void checkCompileStaticGraph<UndirG>(UndirG &);
61 //Compile SubBidirGraphWrapper
62 typedef SubBidirGraphWrapper<Graph, Graph::EdgeMap<bool>,
63 Graph::EdgeMap<bool> > SubBDGW;
64 template void checkCompileStaticGraph<SubBDGW>(SubBDGW &);
66 //Compile BidirGraphWrapper
67 typedef BidirGraphWrapper<Graph> BidirGW;
68 template void checkCompileStaticGraph<BidirGW>(BidirGW &);
71 typedef BidirGraph<Graph> BidirG;
72 template void checkCompileStaticGraph<BidirG>(BidirG &);
74 //Compile ResGraphWrapper
75 typedef ResGraphWrapper<Graph, int, Graph::EdgeMap<int>,
76 Graph::EdgeMap<int> > ResGW;
77 template void checkCompileStaticGraph<ResGW>(ResGW &);
79 //Compile ErasingFirstGraphWrapper
80 typedef ErasingFirstGraphWrapper<Graph, Graph::NodeMap<Graph::Edge> > ErasingFirstGW;
81 template void checkCompileStaticGraph<ErasingFirstGW>(ErasingFirstGW &);
86 std::cout << __FILE__ ": All tests passed.\n";