Changeset 1193:c8fa41fcc4a7 in lemon for test/graph_test.h
- Timestamp:
- 12/01/11 09:05:47 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/graph_test.h
r1187 r1193 47 47 for(int i=0;i<cnt;i++) { 48 48 check(n!=INVALID,"Wrong red Node list linking."); 49 check(G.red(n),"Wrong node set check."); 50 check(!G.blue(n),"Wrong node set check."); 51 typename Graph::Node nn = n; 52 check(G.asRedNodeUnsafe(nn) == n,"Wrong node conversion."); 53 check(G.asRedNode(nn) == n,"Wrong node conversion."); 54 check(G.asBlueNode(nn) == INVALID,"Wrong node conversion."); 55 std::pair<typename Graph::RedNode, typename Graph::BlueNode> rbn = 56 G.asRedBlueNode(nn); 57 check(rbn.first == n,"Wrong node conversion."); 58 check(rbn.second == INVALID,"Wrong node conversion."); 49 59 ++n; 50 60 } … … 59 69 for(int i=0;i<cnt;i++) { 60 70 check(n!=INVALID,"Wrong blue Node list linking."); 71 check(G.blue(n),"Wrong node set check."); 72 check(!G.red(n),"Wrong node set check."); 73 typename Graph::Node nn = n; 74 check(G.asBlueNodeUnsafe(nn) == n,"Wrong node conversion."); 75 check(G.asBlueNode(nn) == n,"Wrong node conversion."); 76 check(G.asRedNode(nn) == INVALID,"Wrong node conversion."); 77 std::pair<typename Graph::RedNode, typename Graph::BlueNode> rbn = 78 G.asRedBlueNode(nn); 79 check(rbn.first == INVALID,"Wrong node conversion."); 80 check(rbn.second == n,"Wrong node conversion."); 61 81 ++n; 62 82 } … … 208 228 for (typename Graph::RedIt n(G); n != INVALID; ++n) { 209 229 check(G.red(n), "Wrong partition"); 210 check(G.redId(n) == G.id(RedNode(n)), "Wrong id"); 211 check(values.find(G.redId(n)) == values.end(), "Wrong id"); 212 check(G.redId(n) <= G.maxRedId(), "Wrong maximum id"); 230 check(values.find(G.id(n)) == values.end(), "Wrong id"); 231 check(G.id(n) <= G.maxRedId(), "Wrong maximum id"); 213 232 values.insert(G.id(n)); 214 233 } … … 222 241 for (typename Graph::BlueIt n(G); n != INVALID; ++n) { 223 242 check(G.blue(n), "Wrong partition"); 224 check(G.blueId(n) == G.id(BlueNode(n)), "Wrong id"); 225 check(values.find(G.blueId(n)) == values.end(), "Wrong id"); 226 check(G.blueId(n) <= G.maxBlueId(), "Wrong maximum id"); 243 check(values.find(G.id(n)) == values.end(), "Wrong id"); 244 check(G.id(n) <= G.maxBlueId(), "Wrong maximum id"); 227 245 values.insert(G.id(n)); 228 246 }
Note: See TracChangeset
for help on using the changeset viewer.