Changeset 1054:6a62b1b4cf23 in lemon0.x for src/test
 Timestamp:
 01/05/05 17:59:50 (16 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1448
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/test/undir_graph_test.cc
r1053 r1054 44 44 } 45 45 46 typedef UndirListGraph Graph; 47 typedef Graph::Node Node; 48 typedef Graph::UndirEdge UEdge; 49 typedef Graph::Edge Edge; 50 typedef Graph::NodeIt NodeIt; 51 typedef Graph::UndirEdgeIt UEdgeIt; 52 typedef Graph::EdgeIt EdgeIt; 53 46 template <typename Graph> 54 47 void check_item_counts(Graph &g, int n, int e) { 55 48 check(countNodes(g)==n, "Wrong node number."); … … 57 50 } 58 51 52 template <typename Graph> 59 53 void print_items(Graph &g) { 54 55 typedef typename Graph::NodeIt NodeIt; 56 typedef typename Graph::UndirEdgeIt UEdgeIt; 57 typedef typename Graph::EdgeIt EdgeIt; 58 60 59 cout << "Nodes" << endl; 61 60 int i=0; … … 82 81 } 83 82 84 int main() { 85 check_concepts(); 83 template <typename Graph> 84 void check_graph() { 86 85 86 typedef typename Graph::Node Node; 87 typedef typename Graph::UndirEdge UEdge; 88 typedef typename Graph::Edge Edge; 89 typedef typename Graph::NodeIt NodeIt; 90 typedef typename Graph::UndirEdgeIt UEdgeIt; 91 typedef typename Graph::EdgeIt EdgeIt; 87 92 88 93 Graph g; … … 103 108 check_item_counts(g,3,2); 104 109 110 111 } 112 113 int main() { 114 check_concepts(); 115 116 check_graph<UndirListGraph>(); 117 check_graph<UndirSmartGraph>(); 118 105 119 return 0; 106 120 }
Note: See TracChangeset
for help on using the changeset viewer.