[ CCUnit project page ] [ CCUnit home page ]
Data Fields

CCUnitTestCase Struct Reference
[TestCaseWriting test fixture]

A single test object. More...

#include <CCUnitTestCase.h>

Data Fields

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

Detailed Description

A single test 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);
 }

 ...

 void MathTest_newTestCase_testAdd ()
 {
   return ccunit_newTestCase ("addTest", "add test", addTest);
 }
See also:
CCUnitTestFixture, CCUnitTestSuite, MakeSuite

Field Documentation

const char* CCUnitTestCase::desc

test description

Referenced by printFailures().

const char* CCUnitTestCase::name

test case name

run test function

Referenced by runTest().


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