Changeset 997:761fe0846f49 in lemon-main for test
- Timestamp:
- 09/13/12 11:45:36 (12 years ago)
- Branch:
- default
- Children:
- 998:7fdaa05a69a1, 1005:c5990f454032
- Phase:
- public
- Location:
- test
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
test/adaptors_test.cc
r465 r997 66 66 Digraph::Arc a2 = digraph.addArc(n1, n3); 67 67 Digraph::Arc a3 = digraph.addArc(n2, n3); 68 ignore_unused_variable_warning(a3); 68 69 69 70 // Check the adaptor … … 100 101 Adaptor::Arc a7 = adaptor.addArc(n1, n4); 101 102 Adaptor::Arc a8 = adaptor.addArc(n1, n2); 103 ignore_unused_variable_warning(a6,a7,a8); 102 104 103 105 adaptor.erase(a1); … … 759 761 Digraph::Arc a2 = digraph.addArc(n1, n3); 760 762 Digraph::Arc a3 = digraph.addArc(n2, n3); 763 ignore_unused_variable_warning(a1,a2,a3); 761 764 762 765 checkGraphNodeList(adaptor, 6); -
test/connectivity_test.cc
r649 r997 69 69 Graph g(d); 70 70 Digraph::Node n = d.addNode(); 71 ignore_unused_variable_warning(n); 71 72 72 73 check(stronglyConnected(d), "This digraph is strongly connected"); … … 246 247 Digraph::Node watch = d.addNode(); 247 248 Digraph::Node pants = d.addNode(); 249 ignore_unused_variable_warning(watch); 248 250 249 251 d.addArc(socks, shoe); -
test/digraph_test.cc
r440 r997 61 61 a3 = G.addArc(n2, n3), 62 62 a4 = G.addArc(n2, n3); 63 ignore_unused_variable_warning(a2,a3,a4); 63 64 64 65 checkGraphNodeList(G, 3); … … 89 90 Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1), 90 91 a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3); 92 ignore_unused_variable_warning(a1,a2,a3,a4); 91 93 92 94 Node n4 = G.split(n2); … … 122 124 a3 = G.addArc(n4, n3), a4 = G.addArc(n4, n3), 123 125 a5 = G.addArc(n2, n4); 126 ignore_unused_variable_warning(a1,a2,a3,a5); 124 127 125 128 checkGraphNodeList(G, 4); … … 201 204 a3 = G.addArc(n4, n3), a4 = G.addArc(n3, n1), 202 205 a5 = G.addArc(n2, n4); 206 ignore_unused_variable_warning(a2,a3,a4,a5); 203 207 204 208 // Check arc deletion … … 248 252 Arc a1 = G.addArc(n1, n2), a2 = G.addArc(n2, n1), 249 253 a3 = G.addArc(n2, n3), a4 = G.addArc(n2, n3); 254 ignore_unused_variable_warning(a1,a2,a3,a4); 250 255 251 256 typename Digraph::Snapshot snapshot(G); … … 336 341 e1 = g.addArc(n1, n2), 337 342 e2 = g.addArc(n2, n3); 343 ignore_unused_variable_warning(e2); 338 344 339 345 check(g.valid(n1), "Wrong validity check"); -
test/edge_set_test.cc
r488 r997 45 45 46 46 Digraph::Arc ga1 = digraph.addArc(n1, n2); 47 ignore_unused_variable_warning(ga1); 47 48 48 49 ArcSet arc_set(digraph); 49 50 50 51 Digraph::Arc ga2 = digraph.addArc(n2, n1); 52 ignore_unused_variable_warning(ga2); 51 53 52 54 checkGraphNodeList(arc_set, 2); … … 76 78 a3 = arc_set.addArc(n2, n3), 77 79 a4 = arc_set.addArc(n2, n3); 80 ignore_unused_variable_warning(a2,a3,a4); 81 78 82 checkGraphNodeList(arc_set, 3); 79 83 checkGraphArcList(arc_set, 4); … … 111 115 112 116 Digraph::Arc ga1 = digraph.addArc(n1, n2); 117 ignore_unused_variable_warning(ga1); 113 118 114 119 ArcSet arc_set(digraph); 115 120 116 121 Digraph::Arc ga2 = digraph.addArc(n2, n1); 122 ignore_unused_variable_warning(ga2); 117 123 118 124 checkGraphNodeList(arc_set, 2); … … 142 148 a3 = arc_set.addArc(n2, n3), 143 149 a4 = arc_set.addArc(n2, n3); 150 ignore_unused_variable_warning(a2,a3,a4); 151 144 152 checkGraphNodeList(arc_set, 3); 145 153 checkGraphArcList(arc_set, 4); … … 191 199 192 200 Digraph::Arc ga1 = digraph.addArc(n1, n2); 201 ignore_unused_variable_warning(ga1); 193 202 194 203 EdgeSet edge_set(digraph); 195 204 196 205 Digraph::Arc ga2 = digraph.addArc(n2, n1); 206 ignore_unused_variable_warning(ga2); 197 207 198 208 checkGraphNodeList(edge_set, 2); … … 231 241 e3 = edge_set.addEdge(n2, n3), 232 242 e4 = edge_set.addEdge(n2, n3); 243 ignore_unused_variable_warning(e2,e3,e4); 244 233 245 checkGraphNodeList(edge_set, 3); 234 246 checkGraphEdgeList(edge_set, 4); … … 275 287 276 288 Digraph::Arc ga1 = digraph.addArc(n1, n2); 289 ignore_unused_variable_warning(ga1); 277 290 278 291 EdgeSet edge_set(digraph); 279 292 280 293 Digraph::Arc ga2 = digraph.addArc(n2, n1); 294 ignore_unused_variable_warning(ga2); 281 295 282 296 checkGraphNodeList(edge_set, 2); … … 315 329 e3 = edge_set.addEdge(n2, n3), 316 330 e4 = edge_set.addEdge(n2, n3); 331 ignore_unused_variable_warning(e2,e3,e4); 332 317 333 checkGraphNodeList(edge_set, 3); 318 334 checkGraphEdgeList(edge_set, 4); -
test/euler_test.cc
r592 r997 102 102 Graph g(d); 103 103 Digraph::Node n = d.addNode(); 104 104 ignore_unused_variable_warning(n); 105 105 106 checkDiEulerIt(d); 106 107 checkDiEulerIt(g); … … 190 191 Digraph::Node n4 = d.addNode(); 191 192 Digraph::Node n5 = d.addNode(); 192 193 ignore_unused_variable_warning(n0,n4,n5); 194 193 195 d.addArc(n1, n2); 194 196 d.addArc(n2, n3); -
test/graph_test.cc
r440 r997 64 64 Edge e2 = G.addEdge(n2, n1), 65 65 e3 = G.addEdge(n2, n3); 66 ignore_unused_variable_warning(e2,e3); 66 67 67 68 checkGraphNodeList(G, 3); … … 96 97 e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4), 97 98 e5 = G.addEdge(n4, n3); 99 ignore_unused_variable_warning(e1,e3,e4,e5); 98 100 99 101 checkGraphNodeList(G, 4); … … 175 177 e3 = G.addEdge(n2, n3), e4 = G.addEdge(n1, n4), 176 178 e5 = G.addEdge(n4, n3); 179 ignore_unused_variable_warning(e1,e3,e4,e5); 177 180 178 181 // Check edge deletion … … 215 218 Edge e1 = G.addEdge(n1, n2), e2 = G.addEdge(n2, n1), 216 219 e3 = G.addEdge(n2, n3); 220 ignore_unused_variable_warning(e1,e2,e3); 217 221 218 222 checkGraphNodeList(G, 3); … … 363 367 e1 = g.addEdge(n1, n2), 364 368 e2 = g.addEdge(n2, n3); 369 ignore_unused_variable_warning(e2); 365 370 366 371 check(g.valid(n1), "Wrong validity check"); … … 492 497 493 498 Node n = G.nodeFromId(dim); 499 ignore_unused_variable_warning(n); 494 500 495 501 for (NodeIt n(G); n != INVALID; ++n) { -
test/maps_test.cc
r684 r997 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 -
test/time_measure_test.cc
r558 r997 18 18 19 19 #include <lemon/time_measure.h> 20 #include <lemon/concept_check.h> 20 21 21 22 using namespace lemon; … … 33 34 34 35 for(int i=0;i<1000;i++) 35 TimeStamp x(T); 36 { 37 TimeStamp x(T); 38 ignore_unused_variable_warning(x); 39 } 36 40 } 37 41
Note: See TracChangeset
for help on using the changeset viewer.