CCUnit project page CCUnit home page

Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

CCUnitTestCase Struct Reference
[TestCaseWriting test fixture]

#include <CCUnitTestCase.h>


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, CCUnitMakeSuite


Data Fields

const char * name
 test case name

const char * desc
 test description

void(* runTest )()
 run test function


Field Documentation

const char* CCUnitTestCase::desc
 

test description

const char* CCUnitTestCase::name
 

test case name

void(* CCUnitTestCase::runTest)()
 

run test function


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