CCUnit  2.1
A C Unit Testing Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Typedefs | Functions
Executing Test

Typedefs

typedef struct CCUnitTestRunner CCUnitTestRunner
 A command line based tool to run tests.

Functions

struct CCUnitTestResultccunit_runTestCase (CCUnitTestCase *testCase)
 run test cases and collect its results.
CCUnitTestRunnerccunit_newTestRunner (FILE *output)
 constructor.
void ccunit_deleteTestRunner (CCUnitTestRunner *runner)
 destructor.
int ccunit_runTestRunner (CCUnitTestRunner *runner, CCUnitTestSuite *suite)
 Runs test suite.
CCUnitTestResultccunit_runTestSuite (CCUnitTestSuite *suite, CCUnitTestResult *result)
 run test suite and collect its results.

Detailed Description


Typedef Documentation

A command line based tool to run tests.

Runs a single test and collects its results. This method can be used to start a test run from your program.

int main (int ac, char** av)
{
CCUnitTestSuite* suite = CREATE_TESTSUITE ();
return runner->run (runner, suite);
}
See also:
CCUnitTestSuite, CCUnitTestCase.

Function Documentation

void ccunit_deleteTestRunner ( CCUnitTestRunner runner)

destructor.

Parameters:
runnerTestRunner object to destruct.

References ccunit_deleteTestResult(), and CCUnitTestRunner::result.

Here is the call graph for this function:

CCUnitTestRunner * ccunit_newTestRunner ( FILE *  output)

constructor.

Parameters:
outputprints test result into this stream.
Returns:
new CCUnitTestRunner object.

References addFailure(), CCUnitTestListener::addFailure, doRun(), endTest(), CCUnitTestListener::endTest, CCUnitTestRunner::listener, CCUnitTestRunner::ofp, CCUnitTestRunner::run, startTest(), and CCUnitTestListener::startTest.

Here is the call graph for this function:

struct CCUnitTestResult* ccunit_runTestCase ( CCUnitTestCase testCase)
read

run test cases and collect its results.

Parameters:
testCasetest case.
Returns:
test result.

References ccunit_newTestResult(), CCUnitTest::run, and CCUnitTestCase::test.

Here is the call graph for this function:

int ccunit_runTestRunner ( CCUnitTestRunner runner,
CCUnitTestSuite suite 
)
inline

Runs test suite.

Parameters:
runnertest runner
suitetest suite
Returns:
0 if succeeded, -1 if error occurred.

References CCUnitTestRunner::run.

CCUnitTestResult * ccunit_runTestSuite ( CCUnitTestSuite suite,
CCUnitTestResult result 
)
inline

run test suite and collect its results.

Parameters:
suitetest suite.
resulttest result. if NULL, create a new result object and return it.
Returns:
test result.

References ccunit_newTestResult(), CCUnitTest::run, and CCUnitTestSuite::test.

Referenced by doRun().

Here is the call graph for this function:

Here is the caller graph for this function:

SourceForge.jp hosts this site. Send comments to: CCUnit Developer