test/circulation_test.cc
changeset 646 f63e87b9748e
parent 463 88ed40ad0d4f
child 658 85cb3aa71cce
     1.1 --- a/test/circulation_test.cc	Sat Apr 18 21:54:30 2009 +0200
     1.2 +++ b/test/circulation_test.cc	Tue Apr 21 10:34:49 2009 +0100
     1.3 @@ -71,27 +71,34 @@
     1.4    DeltaMap delta;
     1.5    FlowMap flow;
     1.6    BarrierMap bar;
     1.7 +  VType v;
     1.8 +  bool b;
     1.9  
    1.10 -  Circulation<Digraph, CapMap, CapMap, DeltaMap>
    1.11 -    ::SetFlowMap<FlowMap>
    1.12 -    ::SetElevator<Elev>
    1.13 -    ::SetStandardElevator<LinkedElev>
    1.14 -    ::Create circ_test(g,lcap,ucap,delta);
    1.15 -
    1.16 -  circ_test.lowerCapMap(lcap);
    1.17 -  circ_test.upperCapMap(ucap);
    1.18 -  circ_test.deltaMap(delta);
    1.19 -  flow = circ_test.flowMap();
    1.20 -  circ_test.flowMap(flow);
    1.21 +  typedef Circulation<Digraph, CapMap, CapMap, DeltaMap>
    1.22 +            ::SetFlowMap<FlowMap>
    1.23 +            ::SetElevator<Elev>
    1.24 +            ::SetStandardElevator<LinkedElev>
    1.25 +            ::Create CirculationType;
    1.26 +  CirculationType circ_test(g, lcap, ucap, delta);
    1.27 +  const CirculationType& const_circ_test = circ_test;
    1.28 +   
    1.29 +  circ_test
    1.30 +    .lowerCapMap(lcap)
    1.31 +    .upperCapMap(ucap)
    1.32 +    .deltaMap(delta)
    1.33 +    .flowMap(flow);
    1.34  
    1.35    circ_test.init();
    1.36    circ_test.greedyInit();
    1.37    circ_test.start();
    1.38    circ_test.run();
    1.39  
    1.40 -  circ_test.barrier(n);
    1.41 -  circ_test.barrierMap(bar);
    1.42 -  circ_test.flow(a);
    1.43 +  v = const_circ_test.flow(a);
    1.44 +  const FlowMap& fm = const_circ_test.flowMap();
    1.45 +  b = const_circ_test.barrier(n);
    1.46 +  const_circ_test.barrierMap(bar);
    1.47 +  
    1.48 +  ignore_unused_variable_warning(fm);
    1.49  }
    1.50  
    1.51  template <class G, class LM, class UM, class DM>