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

Basic


Enumerations

enum  CU_BasicRunMode { CU_BRM_NORMAL = 0, CU_BRM_SILENT, CU_BRM_VERBOSE }
 Run modes for the basic interface. More...

Functions

CU_ErrorCode CU_basic_run_tests (void)
 Run all registered CUnit tests using the basic interface.
CU_ErrorCode CU_basic_run_suite (CU_pSuite pSuite)
 Run all tests for a specific suite in the basic interface.
CU_ErrorCode CU_basic_run_test (CU_pSuite pSuite, CU_pTest pTest)
 Run a single test in a specific suite in the basic interface.
void CU_basic_set_mode (CU_BasicRunMode mode)
 Set the run mode for the basic interface.
CU_BasicRunMode CU_basic_get_mode (void)
 Retrieve the current run mode for the basic interface.
void CU_basic_show_failures (CU_pFailureRecord pFailure)
 Print a summary of run failures to stdout.
CU_ErrorCode basic_initialize (void)
 Perform inialization actions for the basic interface.
CU_ErrorCode basic_run_all_tests (CU_pTestRegistry pRegistry)
 Run all tests within the basic interface.
CU_ErrorCode basic_run_suite (CU_pSuite pSuite)
 Run a specified suite within the basic interface.
CU_ErrorCode basic_run_single_test (CU_pSuite pSuite, CU_pTest pTest)
 Run a single test for the specified suite within the console interface.
void basic_test_start_message_handler (const CU_pTest pTest, const CU_pSuite pSuite)
 Handler function called at start of each test.
void basic_test_complete_message_handler (const CU_pTest pTest, const CU_pSuite pSuite, const CU_pFailureRecord pFailure)
 Handler function called at completion of each test.
void basic_all_tests_complete_message_handler (const CU_pFailureRecord pFailure)
 Handler function called at completion of all tests in a suite.
void basic_suite_init_failure_message_handler (const CU_pSuite pSuite)
 Handler function called when suite initialization fails.

Variables

CU_pSuite f_pRunningSuite = NULL
 Name of currently running suite.
CU_BasicRunMode f_run_mode = CU_BRM_NORMAL


Enumeration Type Documentation

enum CU_BasicRunMode
 

Run modes for the basic interface.

Enumeration values:
CU_BRM_NORMAL  Normal mode - failures and run summary are printed [default].
CU_BRM_SILENT  Silent mode - no output is printed except framework error messages.
CU_BRM_VERBOSE  Verbose mode - maximum output of run details.


Function Documentation

void basic_all_tests_complete_message_handler const CU_pFailureRecord  pFailure  )  [static]
 

Handler function called at completion of all tests in a suite.

Parameters:
pFailure Pointer to the test failure record list.

CU_ErrorCode basic_initialize void   )  [static]
 

Perform inialization actions for the basic interface.

This includes setting output to unbuffered, printing a welcome message, and setting the test run handlers.

Returns:
An error code indicating the framework error condition.

CU_ErrorCode basic_run_all_tests CU_pTestRegistry  pRegistry  )  [static]
 

Run all tests within the basic interface.

The test registry is changed to the specified registry before running the tests, and reset to the original registry when done.

Parameters:
pRegistry The CU_pTestRegistry containing the tests to be run (non-NULL).
Returns:
An error code indicating the error status during the test run.

CU_ErrorCode basic_run_single_test CU_pSuite  pSuite,
CU_pTest  pTest
[static]
 

Run a single test for the specified suite within the console interface.

Parameters:
pSuite The suite containing the test to be run (non-NULL).
pTest The test to be run (non-NULL).
Returns:
An error code indicating the error status during the test run.

CU_ErrorCode basic_run_suite CU_pSuite  pSuite  )  [static]
 

Run a specified suite within the basic interface.

Parameters:
pSuite The suite to be run (non-NULL).
Returns:
An error code indicating the error status during the test run.

void basic_suite_init_failure_message_handler const CU_pSuite  pSuite  )  [static]
 

Handler function called when suite initialization fails.

Parameters:
pSuite The suite for which initialization failed.

void basic_test_complete_message_handler const CU_pTest  pTest,
const CU_pSuite  pSuite,
const CU_pFailureRecord  pFailureList
[static]
 

Handler function called at completion of each test.

Parameters:
pTest The test being run.
pSuite The suite containing the test.
pFailure Pointer to the 1st failure record for this test.

void basic_test_start_message_handler const CU_pTest  pTest,
const CU_pSuite  pSuite
[static]
 

Handler function called at start of each test.

Parameters:
pTest The test being run.
pSuite The suite containing the test.

CU_BasicRunMode CU_basic_get_mode void   ) 
 

Retrieve the current run mode for the basic interface.

Returns:
The current CU_BasicRunMode setting for test runs using the basic interface.

CU_ErrorCode CU_basic_run_suite CU_pSuite  pSuite  ) 
 

Run all tests for a specific suite in the basic interface.

If pSuite is NULL, the function returns without taking any action. The default CU_BasicRunMode is used unless it has been changed using CU_basic_set_mode().

Parameters:
pSuite The CU_Suite to run (non-NULL).
Returns:
A CU_ErrorCode indicating the framework error condition, including CUE_NOSUITE - pSuite was NULL.

CU_ErrorCode CU_basic_run_test CU_pSuite  pSuite,
CU_pTest  pTest
 

Run a single test in a specific suite in the basic interface.

If pSuite or pTest is NULL, the function returns without taking any action. The default CU_BasicRunMode is used unless it has been changed using CU_basic_set_mode.

Parameters:
pSuite The CU_Suite holding the CU_Test to run.
pTest The CU_Test to run.
Returns:
A CU_ErrorCode indicating the framework error condition, including CUE_NOSUITE - pSuite was NULL. CUE_NOTEST - pTest was NULL.

CU_ErrorCode CU_basic_run_tests void   ) 
 

Run all registered CUnit tests using the basic interface.

The default CU_BasicRunMode is used unless it has been previously changed using CU_basic_set_mode().

Returns:
A CU_ErrorCode indicating the framework error condition, including CUE_NOREGISTRY - Registry has not been initialized.

void CU_basic_set_mode CU_BasicRunMode  mode  ) 
 

Set the run mode for the basic interface.

Parameters:
mode The new CU_BasicRunMode for subsequent test runs using the basic interface.

void CU_basic_show_failures CU_pFailureRecord  pFailure  ) 
 

Print a summary of run failures to stdout.

This is provided for user convenience upon request, and does not take into account the current run mode. The failures are printed to stdout independent of the most recent run mode.

Parameters:
pFailure List of CU_pFailureRecord's to output.


Variable Documentation

CU_pSuite f_pRunningSuite = NULL [static]
 

Name of currently running suite.

CU_BasicRunMode f_run_mode = CU_BRM_NORMAL [static]
 


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