[906] | 1 | /* -*- C++ -*- |
---|
[921] | 2 | * src/test/graph_wrapper_test.cc - Part of LEMON, a generic C++ optimization library |
---|
[906] | 3 | * |
---|
[1164] | 4 | * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
---|
[1359] | 5 | * (Egervary Research Group on Combinatorial Optimization, EGRES). |
---|
[906] | 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 | |
---|
[849] | 17 | #include<iostream> |
---|
[946] | 18 | #include<lemon/concept_check.h> |
---|
| 19 | |
---|
[921] | 20 | #include<lemon/smart_graph.h> |
---|
[959] | 21 | #include<lemon/concept/graph.h> |
---|
[946] | 22 | |
---|
[921] | 23 | #include<lemon/list_graph.h> |
---|
| 24 | #include<lemon/full_graph.h> |
---|
| 25 | #include<lemon/graph_wrapper.h> |
---|
[849] | 26 | |
---|
[870] | 27 | #include"test/test_tools.h" |
---|
| 28 | #include"test/graph_test.h" |
---|
[849] | 29 | |
---|
| 30 | /** |
---|
| 31 | \file |
---|
[878] | 32 | This test makes consistency checks of graph wrappers. |
---|
[849] | 33 | |
---|
[878] | 34 | \todo More extensive tests are needed |
---|
[849] | 35 | */ |
---|
| 36 | |
---|
[921] | 37 | using namespace lemon; |
---|
[959] | 38 | using namespace lemon::concept; |
---|
[849] | 39 | |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | int main() |
---|
| 43 | { |
---|
[946] | 44 | { |
---|
[998] | 45 | typedef StaticGraph Graph; |
---|
| 46 | checkConcept<StaticGraph, GraphWrapper<Graph> >(); |
---|
[946] | 47 | |
---|
[998] | 48 | checkConcept<StaticGraph, RevGraphWrapper<Graph> >(); |
---|
[946] | 49 | |
---|
[998] | 50 | checkConcept<StaticGraph, SubGraphWrapper<Graph, |
---|
| 51 | Graph::NodeMap<bool> , Graph::EdgeMap<bool> > >(); |
---|
| 52 | checkConcept<StaticGraph, NodeSubGraphWrapper<Graph, |
---|
| 53 | Graph::NodeMap<bool> > >(); |
---|
| 54 | checkConcept<StaticGraph, EdgeSubGraphWrapper<Graph, |
---|
| 55 | Graph::EdgeMap<bool> > >(); |
---|
[992] | 56 | |
---|
[998] | 57 | checkConcept<StaticGraph, SubBidirGraphWrapper<Graph, |
---|
| 58 | Graph::EdgeMap<bool>, Graph::EdgeMap<bool> > >(); |
---|
[1160] | 59 | // checkConcept<StaticGraph, BidirGraph<Graph> >(); |
---|
[998] | 60 | checkConcept<StaticGraph, ResGraphWrapper<Graph, int, |
---|
| 61 | Graph::EdgeMap<int>, Graph::EdgeMap<int> > >(); |
---|
[946] | 62 | |
---|
[998] | 63 | checkConcept<StaticGraph, ErasingFirstGraphWrapper<Graph, |
---|
| 64 | Graph::NodeMap<Graph::Edge> > >(); |
---|
[946] | 65 | } |
---|
[849] | 66 | std::cout << __FILE__ ": All tests passed.\n"; |
---|
| 67 | |
---|
| 68 | return 0; |
---|
| 69 | } |
---|