CCUnit  2.1
A C Unit Testing Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
CCUnitTestFunc Struct Reference

A single test function object. More...

#include <CCUnitTestFunc.h>

Collaboration diagram for CCUnitTestFunc:
Collaboration graph

Data Fields

const char * name
 test func name
const char * desc
 test description
void(* runTest )()
 run test function

Detailed Description

A single test function object.

For each test implement a function which interacts with the case. Verify the expected results with assertions specified by calling CCUNIT_ASSERT on the expression you want to test:

void testAdd ()
{
int result = value1 + value2;
CCUNIT_ASSERT (result == 5);
}
...
int main ()
{
CCUnitTestCase* c = ccunit_newTestCase ("math test");
CCUnitTestFunc* f = ccunit_newTestFunc ("testAdd", "add test", testAdd);
return 0;
}
See also:
CCUnitTestCase, CCUnitTestSuite, MakeSuite

Field Documentation

const char* CCUnitTestFunc::desc
const char* CCUnitTestFunc::name
void(* CCUnitTestFunc::runTest)()

run test function

Referenced by ccunit_newTestFunc(), ccunit_newTestSuiteFromDfn(), run(), and runTest().


The documentation for this struct was generated from the following file:
SourceForge.jp hosts this site. Send comments to: CCUnit Developer