43 TRACE (
test,
"CTOR TransDummy() --> this=%p",
this);
49 TRACE (
test,
"DTOR ~TransDummy() this=%p",
this);
61 TRACE (
test,
"COPY-ctor TransDummy( ref=%p ) --> this=%p", &o,
this);
62 CHECK (!o,
"protocol violation: real copy operations inhibited");
68 TRACE (
test,
"COPY target=%p <-- source=%p",
this,&ref);
70 CHECK (!ref,
"protocol violation: real copy operations inhibited");
77 setVal (x? x :
rani (10000));
78 TRACE (
test,
"CREATE val=%d ---> this=%p", getVal(),
this);
98 TRACE (
test,
"TRANSFER target=%p <-- source=%p", &to,&from);
99 CHECK (!to,
"protocol violation: target already manages another object");
100 to.setVal (from.getVal());
105 typedef vector<TransDummy, Allo> TransDummyVector;
126 cout <<
"\n..setup table space for 2 elements\n";
127 TransDummyVector table;
129 CHECK (0 == Dummy::checksum());
131 cout <<
"\n..install one element at index[0]\n";
132 table.push_back(TransDummy());
133 CHECK (0 == Dummy::checksum());
136 CHECK (0 < Dummy::checksum());
137 int theSum = Dummy::checksum();
139 cout <<
"\n..*** resize table to 5 elements\n";
141 CHECK (theSum==Dummy::checksum());
143 cout <<
"\n..install another element\n";
145 CHECK (theSum+375==Dummy::checksum());
147 cout <<
"\n..kill all elements....\n";
149 CHECK (0 == Dummy::checksum());
int rani(uint bound=_iBOUND())
Implementation namespace for support and library code.
A mechanism to take ownership without allowing copy.
Addendum to scoped-holder.hpp for transferring the lifecycle management to another instance...
Simplistic test class runner.
unittest helper code: test dummy objects to track instances.
A Dummy object for tests.
auto setup(FUN &&workFun)
Helper: setup a Worker-Pool configuration for the test.