#include <tf_test.h>
List of all members.
Public Member Functions |
| TF_Test (const char *_suite, const char *_descr, const char *_idstr, MainFunc *_main) |
Static Public Member Functions |
static int | run (const char *const *prefixes, const char *suite) |
static int | run_all (const char *const *prefixes=NULL) |
static int | run_suite (const char *suite) |
static void | start (const char *file, int line, const char *condstr) |
static void | check (bool cond) |
static bool | start_check (const char *file, int line, const char *condstr, bool cond) |
static bool | start_check_eq (const char *file, int line, const char *a, const char *b) |
static bool | start_check_eq (const char *file, int line, int a, int b) |
static void | pulse () |
| send a pulse to reset the alarm
|
static const char * | get_test_src_dir () |
| get the test src dir.
|
static bool | ensure_test_data (const char *file, std::string &path) |
| ensure the test data file exists
|
Private Types |
typedef void | MainFunc () |
Static Private Member Functions |
static void | alarm_handler (int sig) ABI_NORETURN |
Private Attributes |
const char * | m_suite |
const char * | descr |
const char * | idstr |
MainFunc * | main |
TF_Test * | next |
Static Private Attributes |
static TF_Test * | first |
static TF_Test * | last |
static int | fails |
static int | runs |
static time_t | start_time |
Member Typedef Documentation
Constructor & Destructor Documentation
TF_Test::TF_Test |
( |
const char * |
_suite, |
|
|
const char * |
_descr, |
|
|
const char * |
_idstr, |
|
|
MainFunc * |
_main | |
|
) |
| | |
Member Function Documentation
void TF_Test::alarm_handler |
( |
int |
sig |
) |
[static, private] |
void TF_Test::check |
( |
bool |
cond |
) |
[static] |
bool TF_Test::ensure_test_data |
( |
const char * |
file, |
|
|
std::string & |
path | |
|
) |
| | [static] |
const char * TF_Test::get_test_src_dir |
( |
|
) |
[static] |
get the test src dir.
If env ABI_TEST_SRC_DIR is unset, it will return "."
ABI_TEST_SRC_DIR or top_srcdir
References printf.
Referenced by ensure_test_data().
void TF_Test::pulse |
( |
|
) |
[static] |
int TF_Test::run |
( |
const char *const * |
prefixes, |
|
|
const char * |
suite | |
|
) |
| | [static] |
References alarm_handler(), cur, fails, first, MAX_TEST_TIME, memerrs(), memleaks(), prefix_match(), printf, runs, start_time, TFPASS, and time.
Referenced by run_all(), and run_suite().
int TF_Test::run_all |
( |
const char *const * |
prefixes = NULL |
) |
[static] |
int TF_Test::run_suite |
( |
const char * |
suite |
) |
[static] |
void TF_Test::start |
( |
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
condstr | |
|
) |
| | [static] |
static bool TF_Test::start_check |
( |
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
condstr, |
|
|
bool |
cond | |
|
) |
| | [inline, static] |
bool TF_Test::start_check_eq |
( |
const char * |
file, |
|
|
int |
line, |
|
|
int |
a, |
|
|
int |
b | |
|
) |
| | [static] |
bool TF_Test::start_check_eq |
( |
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
a, |
|
|
const char * |
b | |
|
) |
| | [static] |
Member Data Documentation
The documentation for this class was generated from the following files: