42 using lumiera::error::LUMIERA_ERROR_ITER_EXHAUST;
45 typedef ScopedPtrVect<Dummy> VectD;
70 CHECK (0 == Dummy::checksum());
73 CHECK (isnil (holder));
74 CHECK (0 == Dummy::checksum());
78 CHECK (!isnil (holder));
79 CHECK (0 != Dummy::checksum());
84 CHECK (3 == holder.size());
87 CHECK (0 == Dummy::checksum());
88 CHECK (isnil (holder));
99 CHECK (9 == holder.size());
100 CHECK (0 < Dummy::checksum());
102 CHECK (0 == Dummy::checksum());
109 CHECK (0 == Dummy::checksum());
112 for (
int i=0; i<16; ++i)
119 CHECK (check == ii->getVal());
130 CHECK (check == cii->getVal());
137 CHECK (! (holder.end()));
138 CHECK (isnil (holder.end()));
143 CHECK (ii == holder.end());
144 CHECK (cii == holder.end());
149 CHECK (0 == Dummy::checksum());
158 CHECK (0 == Dummy::checksum());
161 CHECK (0 == Dummy::checksum());
162 CHECK (isnil (holder));
169 CHECK (5 == holder.size());
170 CHECK (0 < Dummy::checksum());
172 id2 = holder[2].getVal();
173 id3 = holder[3].getVal();
175 extracted = holder.
detach(& holder[2]);
176 CHECK (id2 == extracted->getVal());
177 CHECK (id3 == holder[2].getVal());
178 CHECK (4 == holder.size());
180 CHECK (0 < Dummy::checksum());
181 CHECK (id2 == Dummy::checksum());
183 extracted->setVal(id2+id3);
184 CHECK (id2+id3 == Dummy::checksum());
187 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.
unittest helper code: test dummy objects to track instances.
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.
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