Changeset 1909:2d806130e700 in lemon-0.x for test/ugraph_test.cc
- Timestamp:
- 01/26/06 16:42:13 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2484
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
test/ugraph_test.cc
r1795 r1909 2 2 3 3 #include <lemon/bits/graph_extender.h> 4 #include <lemon/concept/u ndir_graph.h>4 #include <lemon/concept/ugraph.h> 5 5 #include <lemon/list_graph.h> 6 6 #include <lemon/smart_graph.h> … … 17 17 18 18 void check_concepts() { 19 typedef U ndirGraphExtender<ListGraphBase> UndirListGraphBase;20 21 typedef IterableU ndirGraphExtender<22 AlterableU ndirGraphExtender<UndirListGraphBase> > IterableUndirListGraph;23 24 typedef MappableU ndirGraphExtender<IterableUndirListGraph>25 Mappable UndirListGraph;26 27 typedef ErasableU ndirGraphExtender<28 ClearableU ndirGraphExtender<29 ExtendableU ndirGraphExtender<MappableUndirListGraph> > > Graph;30 31 checkConcept<BaseIterableU ndirGraphConcept, Graph>();32 checkConcept<IterableU ndirGraphConcept, Graph>();33 checkConcept<MappableU ndirGraphConcept, Graph>();34 35 checkConcept<U ndirGraph, Graph>();36 checkConcept<ErasableU ndirGraph, Graph>();37 38 checkConcept<U ndirGraph, UndirListGraph>();39 checkConcept<ErasableU ndirGraph, UndirListGraph>();40 41 checkConcept<U ndirGraph, UndirSmartGraph>();42 checkConcept<ExtendableU ndirGraph, UndirSmartGraph>();43 44 checkConcept<U ndirGraph, UndirFullGraph>();45 46 checkConcept<U ndirGraph, UndirGraph>();47 48 checkConcept<U ndirGraph, GridGraph>();19 typedef UGraphExtender<ListGraphBase> ListUGraphBase; 20 21 typedef IterableUGraphExtender< 22 AlterableUGraphExtender<ListUGraphBase> > IterableListUGraph; 23 24 typedef MappableUGraphExtender<IterableListUGraph> 25 MappableListUGraph; 26 27 typedef ErasableUGraphExtender< 28 ClearableUGraphExtender< 29 ExtendableUGraphExtender<MappableListUGraph> > > Graph; 30 31 checkConcept<BaseIterableUGraphConcept, Graph>(); 32 checkConcept<IterableUGraphConcept, Graph>(); 33 checkConcept<MappableUGraphConcept, Graph>(); 34 35 checkConcept<UGraph, Graph>(); 36 checkConcept<ErasableUGraph, Graph>(); 37 38 checkConcept<UGraph, ListUGraph>(); 39 checkConcept<ErasableUGraph, ListUGraph>(); 40 41 checkConcept<UGraph, SmartUGraph>(); 42 checkConcept<ExtendableUGraph, SmartUGraph>(); 43 44 checkConcept<UGraph, FullUGraph>(); 45 46 checkConcept<UGraph, UGraph>(); 47 48 checkConcept<UGraph, GridGraph>(); 49 49 } 50 50 … … 68 68 69 69 int uee = 0; 70 for (typename Graph::U ndirEdgeIt it(g); it != INVALID; ++it) {70 for (typename Graph::UEdgeIt it(g); it != INVALID; ++it) { 71 71 ++uee; 72 72 } 73 73 74 check(uee == e, "Wrong u ndiredge number.");75 check(countU ndirEdges(g) == e, "Wrong undiredge number.");74 check(uee == e, "Wrong uedge number."); 75 check(countUEdges(g) == e, "Wrong uedge number."); 76 76 } 77 77 … … 80 80 81 81 typedef typename Graph::NodeIt NodeIt; 82 typedef typename Graph::U ndirEdgeIt UEdgeIt;82 typedef typename Graph::UEdgeIt UEdgeIt; 83 83 typedef typename Graph::EdgeIt EdgeIt; 84 84 … … 89 89 } 90 90 91 std::cout << "U ndirEdge" << std::endl;91 std::cout << "UEdge" << std::endl; 92 92 i=0; 93 93 for(UEdgeIt it(g); it!=INVALID; ++it, ++i) { … … 111 111 112 112 typedef typename Graph::Node Node; 113 typedef typename Graph::U ndirEdge UEdge;113 typedef typename Graph::UEdge UEdge; 114 114 typedef typename Graph::Edge Edge; 115 115 typedef typename Graph::NodeIt NodeIt; 116 typedef typename Graph::U ndirEdgeIt UEdgeIt;116 typedef typename Graph::UEdgeIt UEdgeIt; 117 117 typedef typename Graph::EdgeIt EdgeIt; 118 118 … … 182 182 check_concepts(); 183 183 184 check_graph< UndirListGraph>();185 check_graph< UndirSmartGraph>();184 check_graph<ListUGraph>(); 185 check_graph<SmartUGraph>(); 186 186 187 187 { 188 UndirFullGraph g(5);188 FullUGraph g(5); 189 189 check_item_counts(g, 5, 10); 190 190 }
Note: See TracChangeset
for help on using the changeset viewer.