Rapicorn - Experimental UI Toolkit - Source Code
13.07.0
|
The Test namespace offers utilities for unit tests. More...
Classes | |
class | Timer |
Class for profiling benchmark tests. More... | |
class | RegisterTest |
Enumerations | |
enum | TrapFlags { TRAP_INHERIT_STDIN, TRAP_SILENCE_STDOUT, TRAP_SILENCE_STDERR, TRAP_NO_FATAL_SYSLOG } |
enum | ModeType { MODE_TESTING, MODE_VERBOSE, MODE_READOUT, MODE_SLOW } |
Functions | |
void | test_output (int kind, const String &output_msg) |
void | set_assertion_hook (const std::function< void()> &hook) |
Install hook tobe called when assertions fail. | |
void | assertion_failed (const char *file, int line, const char *message) |
Internal function for failing assertions. | |
void | add_internal (const String &testname, void(*test_func)(void *), void *data) |
void | add (const String &testname, void(*test_func)(void)) |
bool | verbose (void) |
Indicates whether tests should run verbosely. | |
bool | logging (void) |
Indicates whether only logging tests should be run. | |
bool | slow (void) |
Indicates whether only slow tests should be run. | |
bool | ui_test (void) |
Indicates execution of ui-thread tests. | |
int | run (void) |
Run all registered tests. | |
char | rand_bit (void) |
Return a random bit. | |
int32 | rand_int (void) |
Return random int. | |
int32 | rand_int_range (int32 begin, int32 end) |
Return random int within range. | |
double | test_rand_double (void) |
Return random double. | |
double | test_rand_double_range (double range_start, double range_end) |
Return random double within range. | |
bool | trap_fork (uint64 usec_timeout, uint test_trap_flags) |
bool | trap_fork_silent () |
bool | trap_timed_out () |
bool | trap_passed () |
bool | trap_aborted () |
bool | trap_sigtrap () |
String | trap_stdout () |
String | trap_stderr () |
String | stringify_arg (const char *a, const char *str_a) |
template<class V > | |
String | stringify_arg (const V *a, const char *str_a) |
template<class A > | |
String | stringify_arg (const A &a, const char *str_a) |
template<> | |
String | stringify_arg< float > (const float &a, const char *str_a) |
template<> | |
String | stringify_arg< double > (const double &a, const char *str_a) |
template<> | |
String | stringify_arg< bool > (const bool &a, const char *str_a) |
template<> | |
String | stringify_arg< int8 > (const int8 &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< uint8 > (const uint8 &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< String > (const String &a, const char *str_a) |
const char * | _as_strptr (const char *s) |
The Test namespace offers utilities for unit tests.
The Test namespace is made available by #include <rapicorn-test.hh>
See also rcore/testutils.hh.
String Rapicorn::Test::stringify_arg | ( | const char * | a, |
const char * | str_a | ||
) | [inline] |
== Stringify Args ==