COIN-OR::LEMON - Graph Library

Changeset 1258:bdfc038f364c in lemon for test/maps_test.cc


Ignore:
Timestamp:
08/07/13 06:31:47 (7 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
1.1
Parents:
1248:14394c9603c2 (diff), 1257:3e711ee55d31 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge #294 to branch 1.1

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • test/maps_test.cc

    r1158 r1258  
    8181    NullMap<A,B> map1;
    8282    NullMap<A,B> map2 = map1;
    83     ignore_unused_variable_warning(map2);
     83    ::lemon::ignore_unused_variable_warning(map2);
    8484    map1 = nullMap<A,B>();
    8585  }
     
    9292    ConstMap<A,B> map2 = B();
    9393    ConstMap<A,B> map3 = map1;
    94     ignore_unused_variable_warning(map2,map3);
     94    ::lemon::ignore_unused_variable_warning(map2,map3);
    9595
    9696    map1 = constMap<A>(B());
     
    9999    ConstMap<A,C> map4(C(1));
    100100    ConstMap<A,C> map5 = map4;
    101     ignore_unused_variable_warning(map5);
     101    ::lemon::ignore_unused_variable_warning(map5);
    102102
    103103    map4 = constMap<A>(C(2));
     
    121121    IdentityMap<A> map1;
    122122    IdentityMap<A> map2 = map1;
    123     ignore_unused_variable_warning(map2);
     123    ::lemon::ignore_unused_variable_warning(map2);
    124124
    125125    map1 = identityMap<A>();
     
    182182    checkConcept<ReadMap<B,double>, CompMap>();
    183183    CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>());
    184     ignore_unused_variable_warning(map1);
     184    ::lemon::ignore_unused_variable_warning(map1);
    185185    CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>());
    186     ignore_unused_variable_warning(map2);
     186    ::lemon::ignore_unused_variable_warning(map2);
    187187
    188188    SparseMap<double, bool> m1(false); m1[3.14] = true;
     
    197197    checkConcept<ReadMap<A,double>, CombMap>();
    198198    CombMap map1 = CombMap(DoubleMap(), DoubleMap());
    199     ignore_unused_variable_warning(map1);
     199    ::lemon::ignore_unused_variable_warning(map1);
    200200    CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>());
    201     ignore_unused_variable_warning(map2);
     201    ::lemon::ignore_unused_variable_warning(map2);
    202202
    203203    check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3,
     
    211211    FunctorToMap<F> map1;
    212212    FunctorToMap<F> map2 = FunctorToMap<F>(F());
    213     ignore_unused_variable_warning(map2);
     213    ::lemon::ignore_unused_variable_warning(map2);
    214214
    215215    B b = functorToMap(F())[A()];
    216     ignore_unused_variable_warning(b);
     216    ::lemon::ignore_unused_variable_warning(b);
    217217
    218218    checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >();
    219219    MapToFunctor<ReadMap<A,B> > map =
    220220      MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>());
    221     ignore_unused_variable_warning(map);
     221    ::lemon::ignore_unused_variable_warning(map);
    222222
    223223    check(functorToMap(&func)[A()] == 3,
     
    237237      ConvertMap<ReadMap<double, int>, double> >();
    238238    ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true));
    239     ignore_unused_variable_warning(map1);
     239    ::lemon::ignore_unused_variable_warning(map1);
    240240    ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false));
    241     ignore_unused_variable_warning(map2);
     241    ::lemon::ignore_unused_variable_warning(map2);
    242242
    243243  }
  • test/maps_test.cc

    r1257 r1258  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2011
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    7171  checkConcept<ReadWriteMap<A,B>, ReadWriteMap<A,B> >();
    7272  checkConcept<ReadWriteMap<A,C>, ReadWriteMap<A,C> >();
    73   checkConcept<ReferenceMap<A,B,B&,const B&>, ReferenceMap<A,B,B&,const B&> >();
    74   checkConcept<ReferenceMap<A,C,C&,const C&>, ReferenceMap<A,C,C&,const C&> >();
     73  checkConcept<ReferenceMap<A,B,B&,const B&>,
     74               ReferenceMap<A,B,B&,const B&> >();
     75  checkConcept<ReferenceMap<A,C,C&,const C&>,
     76               ReferenceMap<A,C,C&,const C&> >();
    7577
    7678  // NullMap
     
    369371      check(v1[i++] == *it, "Something is wrong with LoggerBoolMap");
    370372  }
    371  
     373
    372374  // CrossRefMap
    373375  {
     
    377379    checkConcept<ReadWriteMap<Node, int>,
    378380                 CrossRefMap<Graph, Node, int> >();
    379    
     381
    380382    Graph gr;
    381383    typedef CrossRefMap<Graph, Node, char> CRMap;
    382384    typedef CRMap::ValueIterator ValueIt;
    383385    CRMap map(gr);
    384    
     386
    385387    Node n0 = gr.addNode();
    386388    Node n1 = gr.addNode();
    387389    Node n2 = gr.addNode();
    388    
     390
    389391    map.set(n0, 'A');
    390392    map.set(n1, 'B');
Note: See TracChangeset for help on using the changeset viewer.