Changeset 1157:761fe0846f49 in lemon for test/maps_test.cc
- Timestamp:
- 09/13/12 11:45:36 (12 years ago)
- Branch:
- default
- Children:
- 1158:8d2e55fac752, 1159:7fdaa05a69a1, 1167:c5990f454032
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/maps_test.cc
r731 r1157 79 79 NullMap<A,B> map1; 80 80 NullMap<A,B> map2 = map1; 81 ignore_unused_variable_warning(map2); 81 82 map1 = nullMap<A,B>(); 82 83 } … … 89 90 ConstMap<A,B> map2 = B(); 90 91 ConstMap<A,B> map3 = map1; 92 ignore_unused_variable_warning(map2,map3); 93 91 94 map1 = constMap<A>(B()); 92 95 map1 = constMap<A,B>(); … … 94 97 ConstMap<A,C> map4(C(1)); 95 98 ConstMap<A,C> map5 = map4; 99 ignore_unused_variable_warning(map5); 100 96 101 map4 = constMap<A>(C(2)); 97 102 map4.setAll(C(3)); … … 114 119 IdentityMap<A> map1; 115 120 IdentityMap<A> map2 = map1; 121 ignore_unused_variable_warning(map2); 122 116 123 map1 = identityMap<A>(); 117 124 … … 173 180 checkConcept<ReadMap<B,double>, CompMap>(); 174 181 CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>()); 182 ignore_unused_variable_warning(map1); 175 183 CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>()); 184 ignore_unused_variable_warning(map2); 176 185 177 186 SparseMap<double, bool> m1(false); m1[3.14] = true; … … 186 195 checkConcept<ReadMap<A,double>, CombMap>(); 187 196 CombMap map1 = CombMap(DoubleMap(), DoubleMap()); 197 ignore_unused_variable_warning(map1); 188 198 CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>()); 199 ignore_unused_variable_warning(map2); 189 200 190 201 check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3, … … 198 209 FunctorToMap<F> map1; 199 210 FunctorToMap<F> map2 = FunctorToMap<F>(F()); 211 ignore_unused_variable_warning(map2); 212 200 213 B b = functorToMap(F())[A()]; 214 ignore_unused_variable_warning(b); 201 215 202 216 checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >(); 203 MapToFunctor<ReadMap<A,B> > map = MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>()); 217 MapToFunctor<ReadMap<A,B> > map = 218 MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>()); 219 ignore_unused_variable_warning(map); 204 220 205 221 check(functorToMap(&func)[A()] == 3, … … 219 235 ConvertMap<ReadMap<double, int>, double> >(); 220 236 ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true)); 237 ignore_unused_variable_warning(map1); 221 238 ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false)); 239 ignore_unused_variable_warning(map2); 240 222 241 } 223 242
Note: See TracChangeset
for help on using the changeset viewer.