diff -r 924887566bf2 -r ccd2d3a3001e test/gomory_hu_test.cc --- a/test/gomory_hu_test.cc Fri Feb 20 17:17:17 2009 +0100 +++ b/test/gomory_hu_test.cc Wed Feb 25 11:10:52 2009 +0000 @@ -2,11 +2,7 @@ #include "test_tools.h" #include -#include #include -#include -#include -#include #include #include @@ -77,6 +73,18 @@ check(pf.flowValue() == ght.minCutValue(u, v), "Wrong cut 1"); check(cm[u] != cm[v], "Wrong cut 3"); check(pf.flowValue() == cutValue(graph, cm, capacity), "Wrong cut 2"); + + int sum=0; + for(GomoryHuTree::MinCutEdgeIt a(ght, u, v);a!=INVALID;++a) + sum+=capacity[a]; + check(sum == ght.minCutValue(u, v), "Problem with MinCutEdgeIt"); + + sum=0; + for(GomoryHuTree::MinCutNodeIt n(ght, u, v,true);n!=INVALID;++n) + sum++; + for(GomoryHuTree::MinCutNodeIt n(ght, u, v,false);n!=INVALID;++n) + sum++; + check(sum == countNodes(graph), "Problem with MinCutNodeIt"); } }