diff -r d9e802637310 -r 11de70cf8550 test/min_cost_flow_test.cc --- a/test/min_cost_flow_test.cc Mon Jul 07 11:57:45 2014 +0200 +++ b/test/min_cost_flow_test.cc Mon Jul 07 15:58:07 2014 +0200 @@ -395,6 +395,12 @@ mcf3.upperMap(neg2_u); checkMcf(mcf3, mcf3.run(param), neg2_gr, neg2_l, neg2_u, neg2_c, neg2_s, mcf3.OPTIMAL, true, -300, test_str + "-18", GEQ); + + // Tests for empty graph + Digraph gr0; + MCF mcf0(gr0); + mcf0.run(param); + check(mcf0.totalCost() == 0, "Wrong total cost"); } template < typename MCF, typename Param >