Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Internal


Defines

#define TEST(x)   test_cunit_assert_impl((x), #x, __FILE__, __LINE__)
 Test a logical condition.
#define TEST_FATAL(x)   if (!test_cunit_assert_impl((x), #x, __FILE__, __LINE__)) return
 Test a logical condition with return on failure.
#define FAIL(x)   test_cunit_assert_impl(FALSE, #x, __FILE__, __LINE__)
 Record a failure.

Functions

void test_cunit_initialize (void)
void test_cunit_report_results (void)
int main ()
void test_cunit_start_tests (const char *strName)
 Notify the test system that a set of tests is starting.
void test_cunit_end_tests (void)
 Notify the test system that a set of tests is complete.
void test_cunit_add_test (void)
 Register running a test (assertion).
void test_cunit_add_failure (void)
 Register failure of a test.
unsigned int test_cunit_test_count (void)
 Retrieve the number of tests run.
unsigned int test_cunit_failure_count (void)
 Retrieve the number of failed tests.
BOOL test_cunit_assert_impl (BOOL value, const char *condition, const char *file, unsigned int line)

Variables

unsigned int f_nTests = 0
unsigned int f_nFailures = 0
unsigned int f_nTests_stored = 0
unsigned int f_nFails_stored = 0
clock_t f_start_time


Define Documentation

#define FAIL  )     test_cunit_assert_impl(FALSE, #x, __FILE__, __LINE__)
 

Record a failure.

#define TEST  )     test_cunit_assert_impl((x), #x, __FILE__, __LINE__)
 

Test a logical condition.

Use of this macro allows clients to register a tested assertion with automatic recordkeeping and reporting of failures and run counts. The return value is a BOOL having the same value as the logical condition tested. As such, it may be used in logial expressions itself.

#define TEST_FATAL  )     if (!test_cunit_assert_impl((x), #x, __FILE__, __LINE__)) return
 

Test a logical condition with return on failure.

This macro is the same as the TEST() macro, except that it issues a return statement on failure. It should not be used as a logical condition itself.


Function Documentation

int main  ) 
 

void test_cunit_add_failure void   ) 
 

Register failure of a test.

void test_cunit_add_test void   ) 
 

Register running a test (assertion).

BOOL test_cunit_assert_impl BOOL  value,
const char *  condition,
const char *  file,
unsigned int  line
 

void test_cunit_end_tests void   ) 
 

Notify the test system that a set of tests is complete.

Optional - for reporting purposes only.

unsigned int test_cunit_failure_count void   ) 
 

Retrieve the number of failed tests.

void test_cunit_initialize void   )  [static]
 

void test_cunit_report_results void   )  [static]
 

void test_cunit_start_tests const char *  strName  ) 
 

Notify the test system that a set of tests is starting.

Optional - for reporting purposes only.

Parameters:
strName Name to use to designate this set of tests.

unsigned int test_cunit_test_count void   ) 
 

Retrieve the number of tests run.


Variable Documentation

unsigned int f_nFails_stored = 0 [static]
 

unsigned int f_nFailures = 0 [static]
 

unsigned int f_nTests = 0 [static]
 

unsigned int f_nTests_stored = 0 [static]
 

clock_t f_start_time [static]
 


Generated on Thu Apr 28 12:36:10 2005 for CUnit by  doxygen 1.3.9.1