Lumiera  0.pre.03
»edit your freedom«
test-helper.cpp File Reference

Go to the source code of this file.

Description

definition of some widely used test helper functions.

See also
TestHelper_test
TestHelperDemangling_test

Definition in file test-helper.cpp.

#include "lib/test/test-helper.hpp"
#include "lib/test/tracking-dummy.hpp"
#include "lib/unique-malloc-owner.hpp"
#include "lib/format-string.hpp"
#include "lib/format-cout.hpp"
#include "lib/random.hpp"
#include <string>

Functions

string randStr (size_t len)
 create garbage string of given length More...
 
string showSizeof (size_t siz, string name)
 for printing sizeof(). More...
 

Namespaces

 lib
 Implementation namespace for support and library code.
 

Function Documentation

◆ showSizeof()

string showSizeof ( size_t  siz,
string  name 
)

for printing sizeof().

prints the given size and name literally, without any further magic

Examples:
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 49 of file test-helper.cpp.

References lib::test::showSizeof().

Referenced by TestHelper_test::checkTypeDisplay(), and lib::test::showSizeof().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ randStr()

string randStr ( size_t  len)

create garbage string of given length

Todo:
probably this can be done in a more clever way.

Anyone...?

Returns
string containing arbitrary lower case letters and numbers
Examples:
/Werk/devel/lumi/src/lib/test/test-helper.hpp.

Definition at line 61 of file test-helper.cpp.

References lib::test::randStr().

Referenced by TestHelper_test::checkTypeDisplay(), TestSource::nextResult(), and lib::test::randStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: