47 using LERR_(ITER_EXHAUST);
52 const uint NUM_ELMS = 10;
54 using Numz = vector<uint>;
62 for (uint i=0; i<NUM_ELMS; ++i)
99 Numz numz{makeNumz()};
100 Iter i1{numz.begin(), numz.end()};
106 for (uint i=*i1 ; i1; ++i1, ++i)
115 uint n = numz.size() - 1;
116 CHECK (sum == n*(n+1) / 2);
123 CHECK (join(i4,
"-+-") ==
"1-+-2-+-3-+-4-+-5-+-6-+-7-+-8-+-9-+-10");
139 Numz numz{makeNumz()};
145 CHECK (!isnil(
iter));
146 CHECK (join(
iter) ==
"4, 5, 6, 7, 8, 9");
151 CHECK (!isnil(
iter));
154 CHECK (!isnil(
iter));
155 CHECK (join(
iter) ==
"3, 2, 1, 0");
162 CHECK (!isnil(
iter));
166 CHECK (!isnil(
iter));
173 CHECK (!isnil(
iter));
181 CHECK (!isnil(
iter));
190 CHECK (!isnil(
iter));
209 Numz numz{makeNumz()};
210 Numz
const& const_numz{numz};
213 for (Iter
iter{numz};
218 CHECK (
iter != Iter());
221 CHECK (*
iter == i-1);
225 for (CIter
iter{const_numz};
230 CHECK (
iter != CIter());
231 CHECK (*
iter == i-1);
263 CHECK (i1 == i2); CHECK (i2 == i1);
264 CHECK (i1 != iN); CHECK (iN != i1);
265 CHECK (i2 != iN); CHECK (iN != i2);
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
An iterator with the ability to switch direction.
void iterTypeVariations()
Implementation namespace for support and library code.
Simple test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
A collection of frequently used helper functions to support unit testing.
A cursor-like iterator with the ability to switch iteration direction.
void verifyComparisons(IT const &ii)