| [ CCUnit project page ] | [ CCUnit home page ] |
TestFixture module implementation. More...
#include <ccunit/CCUnitTestFixture.h>#include <ccunit/CCUnitTestResult.h>#include <assert.h>#include <setjmp.h>
Functions | |
| void | _ccunit_startTest (CCUnitTestResult *result, struct CCUnitTestCase *test) |
| void | _ccunit_endTest (CCUnitTestResult *result, struct CCUnitTestCase *test) |
| void | ccunit_addTestCase (CCUnitTestFixture *fixture, CCUnitTestCase *testCase) |
| CCUnitTestCase * | ccunit_addNewTestCase (CCUnitTestFixture *fixture, const char *name, const char *desc, void(*runTest)()) |
| static CCUnitTestFailure * | runTest (CCUnitTestCase *testCase, CCUnitTestFunc *setUp, CCUnitTestFunc *tearDown, CCUnitTestResult *result) |
| Runs the bare test sequence. | |
| static void | run (CCUnitTest *test, CCUnitTestResult *result) |
| Runs the test fixture and collects the results in CCUnitTestResult. | |
| static void | destroy (CCUnitTest *test) |
| Destruct test fixture. | |
| CCUnitTestFixture * | ccunit_newTestFixture (const char *name, CCUnitTestFunc *setUp, CCUnitTestFunc *tearDown) |
| void | ccunit_setTestFixtureSetup (CCUnitTestFixture *fixture, CCUnitTestFunc *setup_setUp, CCUnitTestFunc *setup_tearDown) |
| struct CCUnitTestResult * | ccunit_runTestFixture (CCUnitTestFixture *f) |
Variables | |
| jmp_buf | _ccunit_runTest_env |
| run tests exception environment. | |
| CCUnitTestFailure * | _ccunit_testFailure |
| run tests exception. | |
TestFixture module implementation.
| void _ccunit_endTest | ( | CCUnitTestResult * | result, | |
| struct CCUnitTestCase * | test | |||
| ) |
| void _ccunit_startTest | ( | CCUnitTestResult * | result, | |
| struct CCUnitTestCase * | test | |||
| ) |
| CCUnitTestCase* ccunit_addNewTestCase | ( | CCUnitTestFixture * | fixture, | |
| const char * | name, | |||
| const char * | desc, | |||
| void(*)() | runTest | |||
| ) |
References ccunit_addTestCase(), ccunit_newTestCase(), and runTest().

| void ccunit_addTestCase | ( | CCUnitTestFixture * | fixture, | |
| CCUnitTestCase * | testCase | |||
| ) | [inline] |
References ccunit_addList().
Referenced by ccunit_addNewTestCase().


| CCUnitTestFixture* ccunit_newTestFixture | ( | const char * | name, | |
| CCUnitTestFunc * | setUp, | |||
| CCUnitTestFunc * | tearDown | |||
| ) |
References ccunit_initList(), ccunit_initTest(), destroy(), run(), and safe_strdup.

| struct CCUnitTestResult* ccunit_runTestFixture | ( | CCUnitTestFixture * | f | ) | [read] |
| void ccunit_setTestFixtureSetup | ( | CCUnitTestFixture * | fixture, | |
| CCUnitTestFunc * | setup_setUp, | |||
| CCUnitTestFunc * | setup_tearDown | |||
| ) | [inline] |
| static void destroy | ( | CCUnitTest * | test | ) | [static] |
Destruct test fixture.
| test | destruct test. |
References ccunit_deleteList(), ccunit_deleteTestCase(), ccunit_deleteTestFunc(), safe_free, and CCUnitTest::type.
Referenced by ccunit_newTestFixture().


| static void run | ( | CCUnitTest * | test, | |
| CCUnitTestResult * | result | |||
| ) | [static] |
Runs the test fixture and collects the results in CCUnitTestResult.
| test | A test to run. | |
| result | A result container. |
References _ccunit_endTest(), _ccunit_runTest_env, _ccunit_startTest(), ccunit_addFailure(), ccunit_initListIterator(), ccunit_nextListIterator(), runTest(), CCUnitTestCase::setUp, and CCUnitTest::type.
Referenced by ccunit_newTestFixture().


| static CCUnitTestFailure* runTest | ( | CCUnitTestCase * | testCase, | |
| CCUnitTestFunc * | setUp, | |||
| CCUnitTestFunc * | tearDown, | |||
| CCUnitTestResult * | result | |||
| ) | [static] |
Runs the bare test sequence.
References _ccunit_runTest_env, ccunit_addFailure(), CCUnitTestResult::runCount, and CCUnitTestFunc::runTest.
Referenced by ccunit_addNewTestCase(), and run().


|
|
hosts this site. | Send comments to: CCUnit Developer |
Generated on Sun Aug 29 2010 10:59:30 for CCUnit by 1.7.1
|