[906] | 1 | /* -*- C++ -*- |
---|
| 2 | * |
---|
[1956] | 3 | * This file is a part of LEMON, a generic C++ optimization library |
---|
| 4 | * |
---|
| 5 | * Copyright (C) 2003-2006 |
---|
| 6 | * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
---|
[1359] | 7 | * (Egervary Research Group on Combinatorial Optimization, EGRES). |
---|
[906] | 8 | * |
---|
| 9 | * Permission to use, modify and distribute this software is granted |
---|
| 10 | * provided that this copyright notice appears in all copies. For |
---|
| 11 | * precise terms see the accompanying LICENSE file. |
---|
| 12 | * |
---|
| 13 | * This software is provided "AS IS" with no warranty of any kind, |
---|
| 14 | * express or implied, and with no claim as to its suitability for any |
---|
| 15 | * purpose. |
---|
| 16 | * |
---|
| 17 | */ |
---|
| 18 | |
---|
[849] | 19 | #include<iostream> |
---|
[946] | 20 | #include<lemon/concept_check.h> |
---|
| 21 | |
---|
[921] | 22 | #include<lemon/smart_graph.h> |
---|
[959] | 23 | #include<lemon/concept/graph.h> |
---|
[1909] | 24 | #include<lemon/concept/ugraph.h> |
---|
[946] | 25 | |
---|
[921] | 26 | #include<lemon/list_graph.h> |
---|
| 27 | #include<lemon/full_graph.h> |
---|
[1401] | 28 | #include<lemon/graph_adaptor.h> |
---|
[1980] | 29 | #include<lemon/ugraph_adaptor.h> |
---|
[849] | 30 | |
---|
[870] | 31 | #include"test/test_tools.h" |
---|
| 32 | #include"test/graph_test.h" |
---|
[849] | 33 | |
---|
| 34 | /** |
---|
| 35 | \file |
---|
[1401] | 36 | This test makes consistency checks of graph adaptors. |
---|
[849] | 37 | |
---|
[878] | 38 | \todo More extensive tests are needed |
---|
[849] | 39 | */ |
---|
| 40 | |
---|
[921] | 41 | using namespace lemon; |
---|
[959] | 42 | using namespace lemon::concept; |
---|
[849] | 43 | |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | int main() |
---|
| 47 | { |
---|
[946] | 48 | { |
---|
[998] | 49 | typedef StaticGraph Graph; |
---|
[1401] | 50 | checkConcept<StaticGraph, GraphAdaptor<Graph> >(); |
---|
[946] | 51 | |
---|
[1401] | 52 | checkConcept<StaticGraph, RevGraphAdaptor<Graph> >(); |
---|
[946] | 53 | |
---|
[1401] | 54 | checkConcept<StaticGraph, SubGraphAdaptor<Graph, |
---|
[998] | 55 | Graph::NodeMap<bool> , Graph::EdgeMap<bool> > >(); |
---|
[1401] | 56 | checkConcept<StaticGraph, NodeSubGraphAdaptor<Graph, |
---|
[998] | 57 | Graph::NodeMap<bool> > >(); |
---|
[1401] | 58 | checkConcept<StaticGraph, EdgeSubGraphAdaptor<Graph, |
---|
[998] | 59 | Graph::EdgeMap<bool> > >(); |
---|
[992] | 60 | |
---|
[1401] | 61 | checkConcept<StaticGraph, SubBidirGraphAdaptor<Graph, |
---|
[998] | 62 | Graph::EdgeMap<bool>, Graph::EdgeMap<bool> > >(); |
---|
[1160] | 63 | // checkConcept<StaticGraph, BidirGraph<Graph> >(); |
---|
[1401] | 64 | checkConcept<StaticGraph, ResGraphAdaptor<Graph, int, |
---|
[998] | 65 | Graph::EdgeMap<int>, Graph::EdgeMap<int> > >(); |
---|
[946] | 66 | |
---|
[1401] | 67 | checkConcept<StaticGraph, ErasingFirstGraphAdaptor<Graph, |
---|
[998] | 68 | Graph::NodeMap<Graph::Edge> > >(); |
---|
[1383] | 69 | |
---|
[1980] | 70 | checkConcept<UGraph, UndirGraphAdaptor<Graph> >(); |
---|
| 71 | |
---|
| 72 | checkConcept<UGraph, SubUGraphAdaptor<UGraph, |
---|
| 73 | UGraph::NodeMap<bool> , UGraph::UEdgeMap<bool> > >(); |
---|
| 74 | checkConcept<UGraph, NodeSubUGraphAdaptor<UGraph, |
---|
| 75 | UGraph::NodeMap<bool> > >(); |
---|
| 76 | checkConcept<UGraph, EdgeSubUGraphAdaptor<UGraph, |
---|
| 77 | UGraph::UEdgeMap<bool> > >(); |
---|
| 78 | |
---|
| 79 | checkConcept<StaticGraph, DirUGraphAdaptor<UGraph, |
---|
| 80 | UGraph::UEdgeMap<bool> > >(); |
---|
[946] | 81 | } |
---|
[849] | 82 | std::cout << __FILE__ ": All tests passed.\n"; |
---|
| 83 | |
---|
| 84 | return 0; |
---|
| 85 | } |
---|