OSDN Git Service

add doxycomment
[ccunit/ccunit.git] / src / ccunit / CCUnitTestRunner.h
index 953d0ba..b02833d 100644 (file)
@@ -21,6 +21,9 @@
 /*
  * $Id$
  */
+/**@file
+ * TestRunner module.
+ */
 #ifndef CCUNITTESTRUNNER_H
 #define CCUNITTESTRUNNER_H
 
 #include <ccunit/CCUnitTestSuite.h>
 #include <ccunit/CCUnitTestListener.h>
 
-typedef struct CCUnitTestRunner CCUnitTestRunner;
-typedef int (*ccunit_runsuite_func_t)(CCUnitTestRunner*, CCUnitTestSuite*);
-
 /**
+ * @ingroup CCUnitTestListener
+ * @defgroup CCUnitTestRunner TestRunner
  * A command line based tool to run tests.  Runs a single test and
  * collects its results.  This method can be used to start a test run
  * from your program.
  * <pre>
  *     int main (int ac, char** av)
  *     {
- *         CCUnitTestRunner* runner = ccunit_newTestRunner (NULL);
- *         CCUnitTestSuite* suite = CREATE_TESTSUITE ();
- *         return runner->run (runner, suite);
+ *       CCUnitTestRunner* runner = ccunit_newTestRunner (NULL);
+ *       CCUnitTestSuite* suite = <var>CREATE_TESTSUITE</var> ();
+ *       return runner->run (runner, suite);
  *     }
  * </pre>
- * @see CCUnitTestSuite
- * @see CCUnitTestCase
+ * @{
+ */
+
+/**
+ * Runs a single test and collects its results.  This method can be
+ * used to start a test run from your program.
+ *
+ * @see CCUnitTestSuite, CCUnitTestCase.
+ */
+typedef struct CCUnitTestRunner CCUnitTestRunner;
+
+/**
+ * Runs a single test and collects its results.  This method can be
+ * used to start a test run from your program.
+ *
+ * @see CCUnitTestSuite, CCUnitTestCase.
  */
 struct CCUnitTestRunner
 {
   CCUnitTestListener listener;                 /**< test listeners */
   CCUnitTestResult* result;                    /**< test result container */
-  ccunit_runsuite_func_t run;                  /**< test run function */
+  int (*run)(CCUnitTestRunner*, CCUnitTestSuite*); /**< test run function */
   FILE* ofp;                                   /**< result output stream */
 };
 
@@ -69,4 +85,6 @@ extern CCUnitTestRunner* ccunit_newTestRunner (FILE* output);
  */
 extern void ccunit_deleteTestRunner (CCUnitTestRunner* runner);
 
+/** @} */
+
 #endif