* @{
*/
-/**
- * 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.
{
if (result->shouldStop)
break;
- runTest (test, result);
+ test->run (test, result);
}
}
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;
+}
+
/** @} */