{
CCUnitTestType_t type; /**< test type */
char* name; /**< test name */
+ char* idname; /**< id name */
void (*dtor) (struct CCUnitTestDef*); /**< test destcuctor */
} CCUnitTestDef;
/*
* Test case definition information.
*/
-typedef struct CCUnitTestCaseDef
+typedef struct CCUnitFuncDef
{
+ char* scope; /**< scope */
char* type; /**< return type */
char* name; /**< function name */
char* desc; /**< description */
-} CCUnitTestCaseDef;
+} CCUnitFuncDef;
/* @} */
typedef struct CCUnitTestFixtureDef
{
CCUnitTestDef testdef; /**< super class */
+ CCUnitFuncDef* ctor; /**< constructor */
+ CCUnitFuncDef* dtor; /**< destructor */
+ CCUnitFuncDef* setUp; /**< test setup function */
+ CCUnitFuncDef* tearDown; /**< test tearDown function */
CCUnitList testCases; /**< test case list */
- CCUnitTestCaseDef* setUp; /**< test setup function */
- CCUnitTestCaseDef* tearDown; /**< test tearDown function */
} CCUnitTestFixtureDef;
/* @} */
const char* name,
CCUnitTestSuiteDef* suite);
+/*
+ * output test suite making function code.
+ *
+ * @param ofp output stream.
+ * @param name add function name.
+ * @param suite test suite to print.
+ */
+extern void ccunit_printSuite (FILE* ofp,
+ const char* name,
+ CCUnitTestSuiteDef* suite);
+
/* @} */
/**
{
CCUnitListIterator itor;
CCUnitTestDef* test;
- CCUnitTestCaseDef* testCase;
+ CCUnitFuncDef* testCase;
static unsigned suiteid = 0;
char sname[32];
sprintf (sname, "newSuite_%03u", ++ suiteid);
else if (testdef->type == ccunitTypeFixture)
{
CCUnitListIterator fitor;
- CCUnitTestCaseDef* testCase;
+ CCUnitFuncDef* testCase;
CCUnitTestFixtureDef* testFixture = (CCUnitTestFixtureDef*)testdef;
fprintf (ofp,
" {\n"