53 TRACE (
test,
"CTOR TransDummy() --> this=%p",
this);
59 TRACE (
test,
"DTOR ~TransDummy() this=%p",
this);
71 TRACE (
test,
"COPY-ctor TransDummy( ref=%p ) --> this=%p", &o,
this);
72 CHECK (!o,
"protocol violation: real copy operations inhibited");
78 TRACE (
test,
"COPY target=%p <-- source=%p",
this,&ref);
80 CHECK (!ref,
"protocol violation: real copy operations inhibited");
87 setVal (x? x : (rand() % 10000));
88 TRACE (
test,
"CREATE val=%d ---> this=%p", getVal(),
this);
108 TRACE (
test,
"TRANSFER target=%p <-- source=%p", &to,&from);
109 CHECK (!to,
"protocol violation: target already manages another object");
110 to.setVal (from.getVal());
115 typedef vector<TransDummy, Allo> TransDummyVector;
134 cout <<
"\n..setup table space for 2 elements\n";
135 TransDummyVector table;
137 CHECK (0 == Dummy::checksum());
139 cout <<
"\n..install one element at index[0]\n";
140 table.push_back(TransDummy());
141 CHECK (0 == Dummy::checksum());
144 CHECK (0 < Dummy::checksum());
145 int theSum = Dummy::checksum();
147 cout <<
"\n..*** resize table to 5 elements\n";
149 CHECK (theSum==Dummy::checksum());
151 cout <<
"\n..install another element\n";
153 CHECK (theSum+375==Dummy::checksum());
155 cout <<
"\n..kill all elements....\n";
157 CHECK (0 == Dummy::checksum());
Implementation namespace for support and library code.
unittest helper code: test dummy objects to track instances.
A mechanism to take ownership without allowing copy.
Addendum to scoped-holder.hpp for transferring the lifecycle management to another instance...
Simple test class runner.
A Dummy object for tests.
auto setup(FUN &&workFun)
Helper: setup a Worker-Pool configuration for the test.