Classes | |
struct | TestEntry |
class | Timer |
Namespaces | |
namespace | Ase |
namespace | Ase::Test |
Macros | |
#define | TASSERT(cond) |
#define | TASSERT_AT(LINE, cond) |
#define | TBENCH(...) |
#define | TCHECK(cond, ...) |
#define | TCMP(a, cmp, b) |
#define | TCMPS(a, cmp, b) |
#define | TDONE() |
#define | TEST_ADD(fun) |
#define | TEST_BENCH(fun) |
#define | TEST_BROKEN(fun) |
#define | TEST_SLOW(fun) |
#define | TFLOATS(a, b, eps) |
#define | TNOTE(...) |
#define | TOK() |
#define | TPASS(...) |
#define | TSTART(...) |
Typedefs | |
using | TestEntries = std::vector< TestEntry > |
Enumerations | |
enum | Kind { PLAIN , SLOW , BENCH , BROKEN , INTEGRITY } |
Functions | |
const char * | _as_strptr (const char *s) |
TestEntries | list_tests () |
double | random_float () |
double | random_frange (double begin, double end) |
uint64_t | random_int64 () |
int64_t | random_irange (int64_t begin, int64_t end) |
int | run () |
int | run (const StringS &test_names) |
int | run_test (const std::string &test_identifier) |
bool | slow () |
template<class A > | |
String | stringify_arg (const A &a, const char *str_a) |
String | stringify_arg (const char *a, const char *str_a) |
template<class V > | |
String | stringify_arg (const V *a, const char *str_a) |
template<> | |
String | stringify_arg< bool > (const bool &a, const char *str_a) |
template<> | |
String | stringify_arg< double > (const double &a, const char *str_a) |
template<> | |
String | stringify_arg< float > (const float &a, const char *str_a) |
template<> | |
String | stringify_arg< int16 > (const int16 &a, const char *str_a) |
template<> | |
String | stringify_arg< int32 > (const int32 &a, const char *str_a) |
template<> | |
String | stringify_arg< int64 > (const int64 &a, const char *str_a) |
template<> | |
String | stringify_arg< int8 > (const int8 &a, const char *str_a) |
template<> | |
String | stringify_arg< String > (const String &a, const char *str_a) |
template<> | |
String | stringify_arg< uint16 > (const uint16 &a, const char *str_a) |
template<> | |
String | stringify_arg< uint32 > (const uint32 &a, const char *str_a) |
template<> | |
String | stringify_arg< uint64 > (const uint64 &a, const char *str_a) |
template<> | |
String | stringify_arg< uint8 > (const uint8 &a, const char *str_a) |
void | test_output (int kind, const String &msg) |
bool | verbose () |
#define TSTART | ( | ... | ) |
Print message once a test case starts.
#define TDONE | ( | ) |
Print message for test case end.
#define TPASS | ( | ... | ) |
Print a message about a passing test.
#define TBENCH | ( | ... | ) |
Print a message about a passing benchmark.
#define TNOTE | ( | ... | ) |
Print a message from a test program.
#define TCHECK | ( | cond, | |
... | |||
) |
Verbose assertion, calls TPASS() on success./*#end#*/.
#define TCMPS | ( | a, | |
cmp, | |||
b | |||
) |
Variant of TCMP() for C strings.
#define TCMP | ( | a, | |
cmp, | |||
b | |||
) |
Compare a and b according to operator cmp, verbose on failiure.
#define TASSERT | ( | cond | ) |
Unconditional test assertion, enters breakpoint if not fullfilled.
#define TASSERT_AT | ( | LINE, | |
cond | |||
) |
Unconditional test assertion for deputy __LINE__.
#define TOK | ( | ) |
Deprecated progress indicator, tests generally need to run fast.
#define TFLOATS | ( | a, | |
b, | |||
eps | |||
) |
Test floats for equality while ignoring differences smaller than `eps`.
#define TEST_ADD | ( | fun | ) |
Register a function to run as part of the unit test suite.
#define TEST_SLOW | ( | fun | ) |
#define TEST_BENCH | ( | fun | ) |
#define TEST_BROKEN | ( | fun | ) |