OSDN Git Service

The convenient function to make TestSuite run was added.
authortsutsumi <>
Wed, 24 Sep 2003 10:49:39 +0000 (10:49 +0000)
committertsutsumi <>
Wed, 24 Sep 2003 10:49:39 +0000 (10:49 +0000)
A diffuse function was deleted.

src/ccunit/CCUnitTestSuite.c

index 603f0f4..7a6dbee 100755 (executable)
  * @{
  */
 
-/**
- * Runs a test.
- * @param test test to run.
- * @param result result container.
- */
-static inline void runTest (CCUnitTest* test, CCUnitTestResult* result)
-{
-  if (!test)
-    return;
-  test->run (test, result);
-}
-
 /*
  * Runs the test cases and collects their result in a TestResult.
  * @param testSuite test suite.
@@ -60,7 +48,7 @@ static void run (CCUnitTest* testSuite, CCUnitTestResult* result)
     {
       if (result->shouldStop)
        break;
-      runTest (test, result);
+      test->run (test, result);
     }
 }
 
@@ -108,4 +96,13 @@ inline void ccunit_addTestFixture (CCUnitTestSuite* suite,
   ccunit_addTest (suite, &fixture->test);
 }
 
+inline CCUnitTestResult* ccunit_runTestSuite (CCUnitTestSuite* suite,
+                                             CCUnitTestResult* result)
+{
+  if (!result)
+    result = ccunit_newTestResult ();
+  suite->test.run (&suite->test, result);
+  return result;
+}
+
 /** @} */