diff -r cd72eae05bdf -r 3c00344f49c9 test/min_mean_cycle_test.cc --- a/test/min_mean_cycle_test.cc Mon Jul 16 16:21:40 2018 +0200 +++ b/test/min_mean_cycle_test.cc Wed Oct 17 19:14:07 2018 +0200 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2010 + * Copyright (C) 2003-2013 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -110,7 +110,7 @@ const SmartDigraph::ArcMap& cm, int cost, int size) { MMC alg(gr, lm); - alg.findCycleMean(); + check(alg.findCycleMean(), "Wrong result"); check(alg.cycleMean() == static_cast(cost) / size, "Wrong cycle mean"); alg.findCycle(); @@ -210,6 +210,13 @@ checkMmcAlg >(gr, l2, c2, 5, 2); checkMmcAlg >(gr, l3, c3, 0, 1); checkMmcAlg >(gr, l4, c4, -1, 1); + + // Howard with iteration limit + HowardMmc mmc(gr, l1); + check((mmc.findCycleMean(2) == HowardMmc::ITERATION_LIMIT), + "Wrong termination cause"); + check((mmc.findCycleMean(4) == HowardMmc::OPTIMAL), + "Wrong termination cause"); } return 0;