| [ CCUnit project page ] | [ CCUnit home page ] |
A single test function object. [詳細]
#include <CCUnitTestFunc.h>
変数 | |
| const char * | name |
| test func name | |
| const char * | desc |
| test description | |
| void(* | runTest )() |
| run test function | |
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 () { CCUnitTestResult* r; CCUnitTestCase* c = ccunit_newTestCase ("math test"); CCUnitTestFunc* f = ccunit_newTestFunc ("testAdd", "add test", testAdd); ccunit_addTestFunc (c, f); r = ccunit_runTestCase (c); return 0; }
| const char* CCUnitTestFunc::desc |
test description
参照元 printFailures().
| const char* CCUnitTestFunc::name |
test func name
参照元 ccunit_addTestFunc().
| void(* CCUnitTestFunc::runTest)() |
|
|
hosts this site. | Send comments to: CCUnit Developer |
Generated on Sun Aug 29 2010 10:59:35 for CCUnit by 1.7.1
|