OSDN Git Service

add test fixture definition struct
authortsntsumi <tsntsumi@users.sourceforge.jp>
Sun, 28 Sep 2003 14:17:37 +0000 (14:17 +0000)
committertsntsumi <tsntsumi@users.sourceforge.jp>
Sun, 28 Sep 2003 14:17:37 +0000 (14:17 +0000)
src/ccunit/CCUnitTestFixture.h

index d184291..e0ea12a 100644 (file)
@@ -128,23 +128,43 @@ typedef struct CCUnitTestFixture
 {
   CCUnitTest test;                             /**< super class */
   const char* name;                            /**< test fixture name */
-  CCUnitList testCases;                                /**< test cases */
+  void (*ctor) ();                             /**< constructor */
+  void (*dtor) ();                             /**< destructor */
   void (*setUp) ();                            /**< setUp function */
   void (*tearDown) ();                         /**< tearDown function */
+  CCUnitList testCases;                                /**< test cases */
 } CCUnitTestFixture;
 
 /**
+ * TestFixture definition structure
+ */
+typedef struct CCUnitTestFixtureDfn
+{
+  CCUnitTestDfn test;                          /**< super class */
+  const char* name;                            /**< test fixture name */
+  void (*ctor) ();                             /**< constructor */
+  void (*dtor) ();                             /**< destructor */
+  void (*setUp) ();                            /**< setUp function */
+  void (*tearDown) ();                         /**< tearDown function */
+  CCUnitTestCase testCases[];                  /**< test cases */
+} CCUnitTestFixtureDfn;
+
+/**
  * create new test fixture.
  *
  * @param name test fixture name.
  * @param setUp test fixture setUp function.
  * @param tearDown test fixture tearDown function.
+ * @param ctor constructor.
+ * @param dtor destrocutor.
  * @return new test fixture.
  * @ingroup WritingTestFixture
  */
 extern CCUnitTestFixture* ccunit_newTestFixture (const char* name,
                                                 void (*setUp)(),
-                                                void (*tearDown)());
+                                                void (*tearDown)(),
+                                                void (*ctor)(),
+                                                void (*dtor)());
 
 /**
  * add test case to test fixture.