Public Member Functions | Static Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | Static Private Attributes

TF_Test Class Reference

#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
MainFuncmain
TF_Testnext

Static Private Attributes

static TF_Testfirst
static TF_Testlast
static int fails
static int runs
static time_t start_time

Member Typedef Documentation

typedef void TF_Test::MainFunc() [private]

Constructor & Destructor Documentation

TF_Test::TF_Test ( const char *  _suite,
const char *  _descr,
const char *  _idstr,
MainFunc _main 
)

References first, idstr, last, and next.


Member Function Documentation

void TF_Test::alarm_handler ( int  sig  )  [static, private]

References MAX_TEST_TIME, and printf.

Referenced by run().

void TF_Test::check ( bool  cond  )  [static]
bool TF_Test::ensure_test_data ( const char *  file,
std::string &  path 
) [static]

ensure the test data file exists

Parameters:
file the base filaname
[out] path the full path of the data file
Returns:
true if the file exists.

References get_test_src_dir().

Referenced by makeDocument(), and TFTEST_MAIN().

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]

send a pulse to reset the alarm

References MAX_TEST_TIME.

Referenced by UT_UUIDGenerator__test().

int TF_Test::run ( const char *const *  prefixes,
const char *  suite 
) [static]
int TF_Test::run_all ( const char *const *  prefixes = NULL  )  [static]

References run().

Referenced by AbiTest::doTests(), and main().

int TF_Test::run_suite ( const char *  suite  )  [static]

References run().

Referenced by AbiTest::doTests().

void TF_Test::start ( const char *  file,
int  line,
const char *  condstr 
) [static]

References printf.

Referenced by start_check(), and start_check_eq().

static bool TF_Test::start_check ( const char *  file,
int  line,
const char *  condstr,
bool  cond 
) [inline, static]

References check(), and start().

bool TF_Test::start_check_eq ( const char *  file,
int  line,
int  a,
int  b 
) [static]

References check(), and start().

bool TF_Test::start_check_eq ( const char *  file,
int  line,
const char *  a,
const char *  b 
) [static]

References check(), and start().


Member Data Documentation

const char* TF_Test::descr [private]
int TF_Test::fails [static, private]

Referenced by check(), and run().

TF_Test * TF_Test::first [static, private]

Referenced by run(), and TF_Test().

const char * TF_Test::idstr [private]

Referenced by TF_Test().

TF_Test * TF_Test::last [static, private]

Referenced by TF_Test().

const char* TF_Test::m_suite [private]
MainFunc* TF_Test::main [private]
TF_Test* TF_Test::next [private]

Referenced by TF_Test().

int TF_Test::runs [static, private]

Referenced by check(), and run().

time_t TF_Test::start_time [static, private]

Referenced by check(), and run().


The documentation for this class was generated from the following files: