Skip to content

Commit 034b43b

Browse files
committed
Cleaned iterator testing
Signed-off-by: Aries Moczar <arcmantis@protulae.com>
1 parent 451571d commit 034b43b

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

src/test/OpenEXRTest/testChannels.cpp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ verifyIterators(void)
229229

230230
l2 = l1;
231231

232-
auto it1 = l1.begin();
233-
const auto cit1 = l1.begin();
232+
ChannelList::Iterator it1 = l1.begin();
233+
ChannelList::ConstIterator cit1 = l1.begin();
234234

235-
auto it2 = l2.begin();
236-
const auto cit2 = l2.begin();
235+
ChannelList::Iterator it2 = l2.begin();
236+
ChannelList::ConstIterator cit2 = l2.begin();
237237

238238
// Test global '==' overloads
239239
assert(it1 == it1);
@@ -252,7 +252,7 @@ verifyIterators(void)
252252
{
253253
// Test '*' overloads
254254
Channel& c = *it1;
255-
const Channel& cc = *it1;
255+
const Channel& cc = *cit1;
256256
assert(c.type == HALF);
257257
assert(cc.type == HALF);
258258

@@ -262,22 +262,30 @@ verifyIterators(void)
262262

263263
// Test pre/post '++' overloads
264264
it1++;
265+
cit1++;
265266
++it2;
267+
++cit2;
266268
}
267269

268270
assert(it1 == l1.end());
271+
assert(cit1 == l1.end());
269272
assert(it2 == l2.end());
273+
assert(cit2 == l2.end());
270274

271275
while (it1 != l1.begin())
272276
{
273277

274278
// Test pre/post '--' overloads
275279
it1--;
280+
cit1--;
276281
--it2;
282+
--cit2;
277283
}
278284

279285
assert(it1 == l1.begin());
286+
assert(cit1 == l1.begin());
280287
assert(it2 == l2.begin());
288+
assert(cit2 == l2.begin());
281289
}
282290

283291
} // namespace
@@ -312,3 +320,5 @@ testChannels (const std::string& tempDir)
312320
assert (false);
313321
}
314322
}
323+
324+

0 commit comments

Comments
 (0)