76 string probeString = isnil(args)?
randStr(123) : args[0];
79 CHECK (!isnil (hotPotato));
81 CHECK (isnil (hotPotato));
88 CharOwner hotPotato(mallocMess (1 + probeString.length()));
89 std::strcpy(hotPotato.get(), probeString.c_str());
97 CHECK (refString == hotPotato.get());
Ownership token for a piece of heap memory allocated in plain-C style.
void verify_and_consume(CharOwner hotPotato, string refString)
UniqueMallocOwner< char > CharOwner
CharOwner place_into_malloced_buffer(string probeString)
virtual void run(Arg args)
void * mallocMess(size_t siz)
string randStr(size_t len)
create garbage string of given length
Implementation namespace for support and library code.
Test runner and basic definitions for tests.
bool isnil(lib::time::Duration const &dur)
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
A collection of frequently used helper functions to support unit testing.
Helper to deal with C-MALLOCed memory automatically.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...