57 static bool _throw_in_ctor;
61 : val_(1 + (rand() % 100000000))
89 checksum() += newVal - val_;
96 std::swap(dum1.val_, dum2.val_);
106 activateCtorFailure(
bool indeed =
true)
108 _throw_in_ctor = indeed;
134 static constexpr
int DEFUNCT = std::numeric_limits<int>::min();
135 static constexpr
int DEAD = std::numeric_limits<int>::max();
141 log.
call (
this,
"dtor", val);
148 log.
call (
this,
"ctor");
154 log.
call (
this,
"ctor", v);
160 log.
call (
this,
"ctor-copy", ol);
166 log.
call (
this,
"ctor-move", oo);
173 if (util::isSameObject (*
this, ol))
175 log.
call (
this,
"self-assign-copy");
179 log.
call (
this,
"assign-copy", ol);
188 if (util::isSameObject (*
this, oo))
190 log.
call (
this,
"self-assign-move");
194 log.
call (
this,
"assign-move", oo);
201 operator string()
const 209 log.
call (
"static",
"swap", t1, t2);
210 std::swap (t1.val, t2.val);
static long _local_checksum
to verify ctor/dtor calls
Support for verifying the occurrence of events from unit tests.
Any copy and copy construction prohibited.
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.