| [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> | 
|---|
| [2260] | 23 | #include<lemon/concepts/graph.h> | 
|---|
|  | 24 | #include<lemon/concepts/ugraph.h> | 
|---|
|  | 25 | #include<lemon/concepts/bpugraph.h> | 
|---|
| [946] | 26 |  | 
|---|
| [921] | 27 | #include<lemon/list_graph.h> | 
|---|
|  | 28 | #include<lemon/full_graph.h> | 
|---|
| [1401] | 29 | #include<lemon/graph_adaptor.h> | 
|---|
| [1980] | 30 | #include<lemon/ugraph_adaptor.h> | 
|---|
| [2231] | 31 | #include<lemon/bpugraph_adaptor.h> | 
|---|
| [849] | 32 |  | 
|---|
| [870] | 33 | #include"test/test_tools.h" | 
|---|
|  | 34 | #include"test/graph_test.h" | 
|---|
| [849] | 35 |  | 
|---|
|  | 36 | /** | 
|---|
|  | 37 | \file | 
|---|
| [1401] | 38 | This test makes consistency checks of graph adaptors. | 
|---|
| [849] | 39 |  | 
|---|
| [878] | 40 | \todo More extensive tests are needed | 
|---|
| [849] | 41 | */ | 
|---|
|  | 42 |  | 
|---|
| [921] | 43 | using namespace lemon; | 
|---|
| [2260] | 44 | using namespace lemon::concepts; | 
|---|
| [849] | 45 |  | 
|---|
|  | 46 |  | 
|---|
|  | 47 |  | 
|---|
|  | 48 | int main() | 
|---|
|  | 49 | { | 
|---|
| [946] | 50 | { | 
|---|
| [2111] | 51 | typedef Graph Graph; | 
|---|
|  | 52 | checkConcept<Graph, GraphAdaptor<Graph> >(); | 
|---|
| [946] | 53 |  | 
|---|
| [2111] | 54 | checkConcept<Graph, RevGraphAdaptor<Graph> >(); | 
|---|
| [946] | 55 |  | 
|---|
| [2111] | 56 | checkConcept<Graph, SubGraphAdaptor<Graph, | 
|---|
| [998] | 57 | Graph::NodeMap<bool> , Graph::EdgeMap<bool> > >(); | 
|---|
| [2111] | 58 | checkConcept<Graph, NodeSubGraphAdaptor<Graph, | 
|---|
| [998] | 59 | Graph::NodeMap<bool> > >(); | 
|---|
| [2111] | 60 | checkConcept<Graph, EdgeSubGraphAdaptor<Graph, | 
|---|
| [998] | 61 | Graph::EdgeMap<bool> > >(); | 
|---|
| [992] | 62 |  | 
|---|
| [2111] | 63 | checkConcept<Graph, ResGraphAdaptor<Graph, int, | 
|---|
| [998] | 64 | Graph::EdgeMap<int>, Graph::EdgeMap<int> > >(); | 
|---|
| [946] | 65 |  | 
|---|
| [2111] | 66 | checkConcept<Graph, ErasingFirstGraphAdaptor<Graph, | 
|---|
| [998] | 67 | Graph::NodeMap<Graph::Edge> > >(); | 
|---|
| [1383] | 68 |  | 
|---|
| [1980] | 69 | checkConcept<UGraph, UndirGraphAdaptor<Graph> >(); | 
|---|
|  | 70 |  | 
|---|
|  | 71 | checkConcept<UGraph, SubUGraphAdaptor<UGraph, | 
|---|
|  | 72 | UGraph::NodeMap<bool> , UGraph::UEdgeMap<bool> > >(); | 
|---|
|  | 73 | checkConcept<UGraph, NodeSubUGraphAdaptor<UGraph, | 
|---|
|  | 74 | UGraph::NodeMap<bool> > >(); | 
|---|
|  | 75 | checkConcept<UGraph, EdgeSubUGraphAdaptor<UGraph, | 
|---|
|  | 76 | UGraph::UEdgeMap<bool> > >(); | 
|---|
|  | 77 |  | 
|---|
| [2111] | 78 | checkConcept<Graph, DirUGraphAdaptor<UGraph, | 
|---|
| [1980] | 79 | UGraph::UEdgeMap<bool> > >(); | 
|---|
| [2231] | 80 |  | 
|---|
|  | 81 | checkConcept<BpUGraph, BpUGraphAdaptor<BpUGraph> >(); | 
|---|
|  | 82 |  | 
|---|
|  | 83 | checkConcept<BpUGraph, SwapBpUGraphAdaptor<BpUGraph> >(); | 
|---|
|  | 84 |  | 
|---|
| [946] | 85 | } | 
|---|
| [849] | 86 | std::cout << __FILE__ ": All tests passed.\n"; | 
|---|
|  | 87 |  | 
|---|
|  | 88 | return 0; | 
|---|
|  | 89 | } | 
|---|