Changeset 1729:06f939455cb1 in lemon0.x for test
 Timestamp:
 10/17/05 12:28:48 (15 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2256
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

test/graph_utils_test.cc
r1728 r1729 83 83 ListGraph graph; 84 84 InDegMap<ListGraph> inDeg(graph); 85 OutDegMap<ListGraph> outDeg(graph); 85 86 std::vector<ListGraph::Node> nodes(nodeNum); 86 87 for (int i = 0; i < nodeNum; ++i) { … … 96 97 "Wrong in degree map"); 97 98 } 98 for (int i = 0; i < edgeNum; ++i) {99 graph.changeTarget(edges[i], nodes[urandom(nodeNum)]);100 }101 99 for (int i = 0; i < nodeNum; ++i) { 102 check(inDeg[nodes[i]] == countInEdges(graph, nodes[i]), 103 "Wrong in degree map"); 104 } 105 for (int i = 0; i < edgeNum; ++i) { 106 graph.changeSource(edges[i], nodes[urandom(nodeNum)]); 107 } 108 for (int i = 0; i < nodeNum; ++i) { 109 check(inDeg[nodes[i]] == countInEdges(graph, nodes[i]), 110 "Wrong in degree map"); 111 } 112 for (int i = 0; i < edgeNum; ++i) { 113 graph.reverseEdge(edges[i]); 114 } 115 for (int i = 0; i < nodeNum; ++i) { 116 check(inDeg[nodes[i]] == countInEdges(graph, nodes[i]), 100 check(outDeg[nodes[i]] == countOutEdges(graph, nodes[i]), 117 101 "Wrong in degree map"); 118 102 }
Note: See TracChangeset
for help on using the changeset viewer.