57 static bool _throw_in_ctor;
66 : val_(1 + (rand() % 100000000))
80 operator= (
Dummy && oDummy)
104 checksum() += newVal - val_;
111 std::swap (dum1.val_, dum2.val_);
121 activateCtorFailure(
bool indeed =
true)
123 _throw_in_ctor = indeed;
149 static constexpr
int DEFUNCT = std::numeric_limits<int>::min();
150 static constexpr
int DEAD = std::numeric_limits<int>::max();
156 log.
call (
this,
"dtor", val);
163 log.
call (
this,
"ctor");
169 log.
call (
this,
"ctor", v);
175 log.
call (
this,
"ctor-copy", ol);
181 log.
call (
this,
"ctor-move", oo);
188 if (util::isSameObject (*
this, ol))
190 log.
call (
this,
"self-assign-copy");
194 log.
call (
this,
"assign-copy", ol);
203 if (util::isSameObject (*
this, oo))
205 log.
call (
this,
"self-assign-move");
209 log.
call (
this,
"assign-move", oo);
216 operator string()
const 224 log.
call (
"static",
"swap", t1, t2);
225 std::swap (t1.val, t2.val);
static long _local_checksum
to verify ctor/dtor calls
Types marked with this mix-in may be moved and move-assigned.
Support for verifying the occurrence of events from unit tests.
virtual long acc(int i)
a dummy API operation
Helper to log and verify the occurrence of events.
A front-end for using printf-style formatting.
friend void swap(Dummy &dum1, Dummy &dum2)
Implementation namespace for support and library code.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
A tracking Dummy object for tests.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
EventLog & call(string target, string function)
Log occurrence of a function call with no arguments.
A Dummy object for tests.