1.1 --- a/test/min_mean_cycle_test.cc Wed Nov 28 12:08:47 2012 +0100
1.2 +++ b/test/min_mean_cycle_test.cc Fri Feb 22 14:12:48 2013 +0100
1.3 @@ -110,7 +110,7 @@
1.4 const SmartDigraph::ArcMap<int>& cm,
1.5 int cost, int size) {
1.6 MMC alg(gr, lm);
1.7 - alg.findCycleMean();
1.8 + check(alg.findCycleMean(), "Wrong result");
1.9 check(alg.cycleMean() == static_cast<double>(cost) / size,
1.10 "Wrong cycle mean");
1.11 alg.findCycle();
1.12 @@ -210,6 +210,13 @@
1.13 checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l2, c2, 5, 2);
1.14 checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l3, c3, 0, 1);
1.15 checkMmcAlg<HowardMmc<GR, IntArcMap> >(gr, l4, c4, -1, 1);
1.16 +
1.17 + // Howard with iteration limit
1.18 + HowardMmc<GR, IntArcMap> mmc(gr, l1);
1.19 + check((mmc.findCycleMean(2) == HowardMmc<GR, IntArcMap>::ITERATION_LIMIT),
1.20 + "Wrong termination cause");
1.21 + check((mmc.findCycleMean(4) == HowardMmc<GR, IntArcMap>::OPTIMAL),
1.22 + "Wrong termination cause");
1.23 }
1.24
1.25 return 0;