Changes in test/graph_test.h [1337:4add05447ca0:1270:dceba191c00d] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/graph_test.h
r1337 r1270 39 39 check(n==INVALID,"Wrong Node list linking."); 40 40 check(countNodes(G)==cnt,"Wrong Node number."); 41 42 #ifdef LEMON_CXX1143 {44 typename Graph::NodeIt n(G);45 for(auto u: G.nodes())46 {47 check(n==u,"Wrong STL Node iterator.");48 ++n;49 }50 check(n==INVALID,"Wrong STL Node iterator.");51 }52 {53 typename Graph::NodeIt n(G);54 for(typename Graph::Node u: G.nodes())55 {56 check(n==u,"Wrong STL Node iterator.");57 ++n;58 }59 check(n==INVALID,"Wrong STL Node iterator.");60 }61 #endif62 41 } 63 42 … … 78 57 check(n==INVALID,"Wrong red Node list linking."); 79 58 check(countRedNodes(G)==cnt,"Wrong red Node number."); 80 #ifdef LEMON_CXX1181 {82 typename Graph::RedNodeIt n(G);83 for(auto u: G.redNodes())84 {85 check(n==u,"Wrong STL RedNode iterator.");86 ++n;87 }88 check(n==INVALID,"Wrong STL RedNode iterator.");89 }90 {91 typename Graph::RedNodeIt n(G);92 for(typename Graph::RedNode u: G.redNodes())93 {94 check(n==u,"Wrong STL RedNode iterator.");95 ++n;96 }97 check(n==INVALID,"Wrong STL RedNode iterator.");98 }99 #endif100 59 } 101 60 … … 116 75 check(n==INVALID,"Wrong blue Node list linking."); 117 76 check(countBlueNodes(G)==cnt,"Wrong blue Node number."); 118 #ifdef LEMON_CXX11119 {120 typename Graph::BlueNodeIt n(G);121 for(auto u: G.blueNodes())122 {123 check(n==u,"Wrong STL BlueNode iterator.");124 ++n;125 }126 check(n==INVALID,"Wrong STL BlueNode iterator.");127 }128 {129 typename Graph::BlueNodeIt n(G);130 for(typename Graph::BlueNode u: G.blueNodes())131 {132 check(n==u,"Wrong STL BlueNode iterator.");133 ++n;134 }135 check(n==INVALID,"Wrong STL BlueNode iterator.");136 }137 #endif138 139 77 } 140 78 … … 153 91 check(e==INVALID,"Wrong Arc list linking."); 154 92 check(countArcs(G)==cnt,"Wrong Arc number."); 155 #ifdef LEMON_CXX11156 {157 typename Graph::ArcIt a(G);158 for(auto e: G.arcs())159 {160 check(a==e,"Wrong STL Arc iterator.");161 ++a;162 }163 check(a==INVALID,"Wrong STL Arc iterator.");164 }165 {166 typename Graph::ArcIt a(G);167 for(typename Graph::Arc e: G.arcs())168 {169 check(a==e,"Wrong STL Arc iterator.");170 ++a;171 }172 check(a==INVALID,"Wrong STL Arc iterator.");173 }174 #endif175 176 93 } 177 94 … … 189 106 check(e==INVALID,"Wrong OutArc list linking."); 190 107 check(countOutArcs(G,n)==cnt,"Wrong OutArc number."); 191 #ifdef LEMON_CXX11192 {193 typename Graph::OutArcIt a(G,n);194 for(auto e: G.outArcs(n))195 {196 check(a==e,"Wrong STL OutArc iterator.");197 ++a;198 }199 check(a==INVALID,"Wrong STL OutArc iterator.");200 }201 {202 typename Graph::OutArcIt a(G,n);203 for(typename Graph::Arc e: G.outArcs(n))204 {205 check(a==e,"Wrong STL OutArc iterator.");206 ++a;207 }208 check(a==INVALID,"Wrong STL OutArc iterator.");209 }210 #endif211 212 108 } 213 109 … … 225 121 check(e==INVALID,"Wrong InArc list linking."); 226 122 check(countInArcs(G,n)==cnt,"Wrong InArc number."); 227 #ifdef LEMON_CXX11228 {229 typename Graph::InArcIt a(G,n);230 for(auto e: G.inArcs(n))231 {232 check(a==e,"Wrong STL InArc iterator.");233 ++a;234 }235 check(a==INVALID,"Wrong STL InArc iterator.");236 }237 {238 typename Graph::InArcIt a(G,n);239 for(typename Graph::Arc e: G.inArcs(n))240 {241 check(a==e,"Wrong STL InArc iterator.");242 ++a;243 }244 check(a==INVALID,"Wrong STL InArc iterator.");245 }246 #endif247 123 } 248 124 … … 259 135 check(e==INVALID,"Wrong Edge list linking."); 260 136 check(countEdges(G)==cnt,"Wrong Edge number."); 261 #ifdef LEMON_CXX11262 {263 typename Graph::EdgeIt a(G);264 for(auto e: G.edges())265 {266 check(a==e,"Wrong STL Edge iterator.");267 ++a;268 }269 check(a==INVALID,"Wrong STL Edge iterator.");270 }271 {272 typename Graph::EdgeIt a(G);273 for(typename Graph::Edge e: G.edges())274 {275 check(a==e,"Wrong STL Edge iterator.");276 ++a;277 }278 check(a==INVALID,"Wrong STL Edge iterator.");279 }280 #endif281 282 137 } 283 138 … … 296 151 check(e==INVALID,"Wrong IncEdge list linking."); 297 152 check(countIncEdges(G,n)==cnt,"Wrong IncEdge number."); 298 #ifdef LEMON_CXX11299 {300 typename Graph::IncEdgeIt a(G,n);301 for(auto e: G.incEdges(n))302 {303 check(a==e,"Wrong STL IncEdge iterator.");304 ++a;305 }306 check(a==INVALID,"Wrong STL IncEdge iterator.");307 }308 {309 typename Graph::IncEdgeIt a(G,n);310 for(typename Graph::Edge e: G.incEdges(n))311 {312 check(a==e,"Wrong STL IncEdge iterator.");313 ++a;314 }315 check(a==INVALID,"Wrong STL IncEdge iterator.");316 }317 #endif318 319 153 } 320 154
Note: See TracChangeset
for help on using the changeset viewer.