33 using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST;
36 typedef ScopedPtrVect<Dummy> VectD;
61 CHECK (0 == Dummy::checksum());
64 CHECK (isnil (holder));
65 CHECK (0 == Dummy::checksum());
69 CHECK (!isnil (holder));
70 CHECK (0 != Dummy::checksum());
75 CHECK (3 == holder.size());
78 CHECK (0 == Dummy::checksum());
79 CHECK (isnil (holder));
90 CHECK (9 == holder.size());
91 CHECK (0 < Dummy::checksum());
93 CHECK (0 == Dummy::checksum());
100 CHECK (0 == Dummy::checksum());
103 for (
int i=0; i<16; ++i)
110 CHECK (check == ii->getVal());
121 CHECK (check == cii->getVal());
128 CHECK (! (holder.end()));
129 CHECK (isnil (holder.end()));
134 CHECK (ii == holder.end());
135 CHECK (cii == holder.end());
140 CHECK (0 == Dummy::checksum());
149 CHECK (0 == Dummy::checksum());
152 CHECK (0 == Dummy::checksum());
153 CHECK (isnil (holder));
160 CHECK (5 == holder.size());
161 CHECK (0 < Dummy::checksum());
163 id2 = holder[2].getVal();
164 id3 = holder[3].getVal();
166 extracted = holder.
detach(& holder[2]);
167 CHECK (id2 == extracted->getVal());
168 CHECK (id3 == holder[2].getVal());
169 CHECK (4 == holder.size());
171 CHECK (0 < Dummy::checksum());
172 CHECK (id2 == Dummy::checksum());
174 extracted->setVal(id2+id3);
175 CHECK (id2+id3 == Dummy::checksum());
178 CHECK (0 == Dummy::checksum());
wrapper for an existing Iterator type, automatically dereferencing the output of the former...
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
Managing lifecycle for a collection of objects.
Implementation namespace for support and library code.
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
unittest helper code: test dummy objects to track instances.
A collection of frequently used helper functions to support unit testing.
T * detach(void *objAddress)
withdraw responsibility for a specific object.
A Dummy object for tests.
T & manage(T *obj)
take ownership of the given object, adding it at the end of the collection