21 #include<lemon/concept/graph.h> |
21 #include<lemon/concept/graph.h> |
22 #include<lemon/concept/undir_graph.h> |
22 #include<lemon/concept/undir_graph.h> |
23 |
23 |
24 #include<lemon/list_graph.h> |
24 #include<lemon/list_graph.h> |
25 #include<lemon/full_graph.h> |
25 #include<lemon/full_graph.h> |
26 #include<lemon/graph_wrapper.h> |
26 #include<lemon/graph_adaptor.h> |
27 |
27 |
28 #include"test/test_tools.h" |
28 #include"test/test_tools.h" |
29 #include"test/graph_test.h" |
29 #include"test/graph_test.h" |
30 |
30 |
31 /** |
31 /** |
32 \file |
32 \file |
33 This test makes consistency checks of graph wrappers. |
33 This test makes consistency checks of graph adaptors. |
34 |
34 |
35 \todo More extensive tests are needed |
35 \todo More extensive tests are needed |
36 */ |
36 */ |
37 |
37 |
38 using namespace lemon; |
38 using namespace lemon; |
42 |
42 |
43 int main() |
43 int main() |
44 { |
44 { |
45 { |
45 { |
46 typedef StaticGraph Graph; |
46 typedef StaticGraph Graph; |
47 checkConcept<StaticGraph, GraphWrapper<Graph> >(); |
47 checkConcept<StaticGraph, GraphAdaptor<Graph> >(); |
48 |
48 |
49 checkConcept<StaticGraph, RevGraphWrapper<Graph> >(); |
49 checkConcept<StaticGraph, RevGraphAdaptor<Graph> >(); |
50 |
50 |
51 checkConcept<StaticGraph, SubGraphWrapper<Graph, |
51 checkConcept<StaticGraph, SubGraphAdaptor<Graph, |
52 Graph::NodeMap<bool> , Graph::EdgeMap<bool> > >(); |
52 Graph::NodeMap<bool> , Graph::EdgeMap<bool> > >(); |
53 checkConcept<StaticGraph, NodeSubGraphWrapper<Graph, |
53 checkConcept<StaticGraph, NodeSubGraphAdaptor<Graph, |
54 Graph::NodeMap<bool> > >(); |
54 Graph::NodeMap<bool> > >(); |
55 checkConcept<StaticGraph, EdgeSubGraphWrapper<Graph, |
55 checkConcept<StaticGraph, EdgeSubGraphAdaptor<Graph, |
56 Graph::EdgeMap<bool> > >(); |
56 Graph::EdgeMap<bool> > >(); |
57 |
57 |
58 checkConcept<StaticGraph, SubBidirGraphWrapper<Graph, |
58 checkConcept<StaticGraph, SubBidirGraphAdaptor<Graph, |
59 Graph::EdgeMap<bool>, Graph::EdgeMap<bool> > >(); |
59 Graph::EdgeMap<bool>, Graph::EdgeMap<bool> > >(); |
60 // checkConcept<StaticGraph, BidirGraph<Graph> >(); |
60 // checkConcept<StaticGraph, BidirGraph<Graph> >(); |
61 checkConcept<StaticGraph, ResGraphWrapper<Graph, int, |
61 checkConcept<StaticGraph, ResGraphAdaptor<Graph, int, |
62 Graph::EdgeMap<int>, Graph::EdgeMap<int> > >(); |
62 Graph::EdgeMap<int>, Graph::EdgeMap<int> > >(); |
63 |
63 |
64 checkConcept<StaticGraph, ErasingFirstGraphWrapper<Graph, |
64 checkConcept<StaticGraph, ErasingFirstGraphAdaptor<Graph, |
65 Graph::NodeMap<Graph::Edge> > >(); |
65 Graph::NodeMap<Graph::Edge> > >(); |
66 |
66 |
67 /// \bug why does not compile with StaticGraph |
67 /// \bug why does not compile with StaticGraph |
68 checkConcept<BaseIterableUndirGraphConcept, UndirGraphWrapper<ListGraph> >(); |
68 checkConcept<BaseIterableUndirGraphConcept, UndirGraphAdaptor<ListGraph> >(); |
69 checkConcept<IterableUndirGraphConcept, UndirGraphWrapper<ListGraph> >(); |
69 checkConcept<IterableUndirGraphConcept, UndirGraphAdaptor<ListGraph> >(); |
70 checkConcept<MappableUndirGraphConcept, UndirGraphWrapper<ListGraph> >(); |
70 checkConcept<MappableUndirGraphConcept, UndirGraphAdaptor<ListGraph> >(); |
71 } |
71 } |
72 std::cout << __FILE__ ": All tests passed.\n"; |
72 std::cout << __FILE__ ": All tests passed.\n"; |
73 |
73 |
74 return 0; |
74 return 0; |
75 } |
75 } |