|
CUnit Programmers Reference
3.0
|
Macros | |
| #define | CU_CI_RUN_SUITES() CU_CI_main(argc, argv) |
| Run all registered tests and save a junit xml report in the current working directory. | |
| #define | CU_CI_DEFINE_SUITE(name, init, clean, setup, teardown) CU_CI_add_suite(name, init, clean, setup, teardown) |
| Set the current suite including any setup/teardown functions. More... | |
| #define | CUNIT_CI_TEST(test) CU_CI_add_test(#test, test) |
| Add a new test to the current suite. More... | |
| #define | CU_SUITE_SETUP() |
| Define a suite setup routine. | |
| #define | CU_SUITE_TEARDOWN() |
| Define a suite cleanup routine. | |
| #define | CU_TEST_SETUP() |
| Define a pre test setup routine. | |
| #define | CU_TEST_TEARDOWN() |
| Define a post test cleanup routine. | |
| #define | CUNIT_CI_RUN(_suitename, ...) |
| Run the given tests as part of a single exe suite. | |
| #define | CUNIT_CI_CLEAR_SETUPS() |
| Disable CUCI setup/teardown and silence compiler warnings about unused variables. | |
Functions | |
| CU_EXPORT void | CU_CI_args (int *argc, char ***argv) |
| Obtain the command line arguments and count that was passed to CU_CI_main() More... | |
| CU_EXPORT int | CU_CI_main (int argc, char **argv) |
| Main Entry point to CI mode of CUnit. More... | |
| CU_EXPORT void | CU_CI_add_suite (const char *name, CU_InitializeFunc init, CU_CleanupFunc clean, CU_SetUpFunc setup, CU_TearDownFunc teardown) |
| Add a suite to CUnit CI. More... | |
| CU_EXPORT void | CU_CI_add_test (const char *name, CU_TestFunc test) |
| Add a test to the current CUnit CI suite. More... | |
| #define CU_CI_DEFINE_SUITE | ( | name, | |
| init, | |||
| clean, | |||
| setup, | |||
| teardown | |||
| ) | CU_CI_add_suite(name, init, clean, setup, teardown) |
Set the current suite including any setup/teardown functions.
| name | the suite name |
| init | suite setup function |
| clean | suite teardown function |
| setup | test setup function |
| teardown | test teardown function |
| #define CUNIT_CI_TEST | ( | test | ) | CU_CI_add_test(#test, test) |
Add a new test to the current suite.
| test | the test function to call. |
| CU_EXPORT void CU_CI_add_suite | ( | const char * | name, |
| CU_InitializeFunc | init, | ||
| CU_CleanupFunc | clean, | ||
| CU_SetUpFunc | setup, | ||
| CU_TearDownFunc | teardown | ||
| ) |
Add a suite to CUnit CI.
| name | suite name |
| init | optional suite setup function |
| clean | optional suite cleanup function |
| setup | optional per test setup function |
| teardown | optional per test cleanup function |
References CU_add_suite_with_setup_and_teardown(), CU_initialize_registry(), CU_registry_initialized(), and CUE_SUCCESS.
| CU_EXPORT void CU_CI_add_test | ( | const char * | name, |
| CU_TestFunc | test | ||
| ) |
Add a test to the current CUnit CI suite.
| name | test name |
| test | test function |
References CU_add_test().
| CU_EXPORT void CU_CI_args | ( | int * | argc, |
| char *** | argv | ||
| ) |
Obtain the command line arguments and count that was passed to CU_CI_main()
| argc | |
| argv |
| CU_EXPORT int CU_CI_main | ( | int | argc, |
| char ** | argv | ||
| ) |
Main Entry point to CI mode of CUnit.
| argc | command line args count |
| argv | vector of command line args |