Changes in test/graph_copy_test.cc [416:bb871cb8ac06:282:dc9e8d2c0df9] in lemon-1.0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/graph_copy_test.cc
r416 r282 30 30 const int nn = 10; 31 31 32 // Build a digraph33 32 SmartDigraph from; 34 33 SmartDigraph::NodeMap<int> fnm(from); … … 53 52 } 54 53 55 // Test digraph copy56 54 ListDigraph to; 57 55 ListDigraph::NodeMap<int> tnm(to); … … 71 69 nodeCrossRef(ncr).arcCrossRef(ecr). 72 70 node(fn, tn).arc(fa, ta).run(); 73 74 check(countNodes(from) == countNodes(to), "Wrong copy.");75 check(countArcs(from) == countArcs(to), "Wrong copy.");76 71 77 72 for (SmartDigraph::NodeIt it(from); it != INVALID; ++it) { … … 96 91 check(tn == nr[fn], "Wrong copy."); 97 92 check(ta == er[fa], "Wrong copy."); 98 99 // Test repeated copy100 digraphCopy(from, to).run();101 102 check(countNodes(from) == countNodes(to), "Wrong copy.");103 check(countArcs(from) == countArcs(to), "Wrong copy.");104 93 } 105 94 … … 107 96 const int nn = 10; 108 97 109 // Build a graph110 98 SmartGraph from; 111 99 SmartGraph::NodeMap<int> fnm(from); … … 135 123 } 136 124 137 // Test graph copy138 125 ListGraph to; 139 126 ListGraph::NodeMap<int> tnm(to); … … 157 144 nodeCrossRef(ncr).arcCrossRef(acr).edgeCrossRef(ecr). 158 145 node(fn, tn).arc(fa, ta).edge(fe, te).run(); 159 160 check(countNodes(from) == countNodes(to), "Wrong copy.");161 check(countEdges(from) == countEdges(to), "Wrong copy.");162 check(countArcs(from) == countArcs(to), "Wrong copy.");163 146 164 147 for (SmartGraph::NodeIt it(from); it != INVALID; ++it) { … … 198 181 check(ta == ar[fa], "Wrong copy."); 199 182 check(te == er[fe], "Wrong copy."); 200 201 // Test repeated copy202 graphCopy(from, to).run();203 204 check(countNodes(from) == countNodes(to), "Wrong copy.");205 check(countEdges(from) == countEdges(to), "Wrong copy.");206 check(countArcs(from) == countArcs(to), "Wrong copy.");207 183 } 208 184
Note: See TracChangeset
for help on using the changeset viewer.