50 bool Dummy::_throw_in_ctor =
false;
52 EventLog Tracker::log{
"Instance-Tracker"};
59 static _Fmt fmt{
"sizeof( %s ) %|40t|= %3d"};
60 return fmt % name % siz;
71 static const string alpha (
"aaaabbccddeeeeffgghiiiijjkkllmmnnooooppqqrrssttuuuuvvwwxxyyyyzz0123456789");
72 static const size_t MAXAL (alpha.size());
74 string garbage(len,
'\0');
77 garbage[--p] = alpha[rand() % MAXAL];
90 std::string
const& expected{*
this};
91 bool expectationMatch {actual == expected};
92 if (not expectationMatch)
94 cerr <<
"FAIL___expectation___________" 95 <<
"\nexpect:"<<expected
96 <<
"\nactual:"<<actual
99 return expectationMatch;
static long _local_checksum
to verify ctor/dtor calls
bool verify(std::string const &actual) const
Helper to deal with C-MALLOCed memory automatically.
A front-end for using printf-style formatting.
string showSizeof(size_t siz, string name)
for printing sizeof().
Implementation namespace for support and library code.
unittest helper code: test dummy objects to track instances.
string randStr(size_t len)
create garbage string of given length
A collection of frequently used helper functions to support unit testing.