1.1 --- a/ucx/test.h Wed Aug 14 16:07:49 2013 +0200 1.2 +++ b/ucx/test.h Fri Aug 16 13:40:10 2013 +0200 1.3 @@ -81,6 +81,7 @@ 1.4 #endif 1.5 1.6 #ifndef __FUNCTION__ 1.7 + 1.8 /** 1.9 * Alias for the <code>__func__</code> preprocessor macro. 1.10 * Some compilers use <code>__func__</code> and others use __FUNC__. 1.11 @@ -92,15 +93,19 @@ 1.12 1.13 /** Type for the UcxTestSuite. */ 1.14 typedef struct UcxTestSuite UcxTestSuite; 1.15 + 1.16 /** Pointer to a test function. */ 1.17 typedef void(*UcxTest)(UcxTestSuite*,FILE*); 1.18 + 1.19 /** Type for the internal list of test cases. */ 1.20 typedef struct UcxTestList UcxTestList; 1.21 1.22 /** Structure for the internal list of test cases. */ 1.23 struct UcxTestList { 1.24 + 1.25 /** Test case. */ 1.26 UcxTest test; 1.27 + 1.28 /** Pointer to the next list element. */ 1.29 UcxTestList *next; 1.30 }; 1.31 @@ -109,10 +114,13 @@ 1.32 * A test suite containing multiple test cases. 1.33 */ 1.34 struct UcxTestSuite { 1.35 + 1.36 /** The number of successful tests after the suite has been run. */ 1.37 unsigned int success; 1.38 + 1.39 /** The number of failed tests after the suite has been run. */ 1.40 unsigned int failure; 1.41 + 1.42 /** 1.43 * Internal list of test cases. 1.44 * Use ucx_test_register() to add tests to this list. 1.45 @@ -125,6 +133,7 @@ 1.46 * @return a new test suite 1.47 */ 1.48 UcxTestSuite* ucx_test_suite_new(); 1.49 + 1.50 /** 1.51 * Destroys a test suite. 1.52 * @param suite the test suite to destroy 1.53 @@ -140,6 +149,7 @@ 1.54 * <code>EXIT_FAILURE</code> on failure 1.55 */ 1.56 int ucx_test_register(UcxTestSuite* suite, UcxTest test); 1.57 + 1.58 /** 1.59 * Runs a test suite and writes the test log to the specified stream. 1.60 * @param suite the test suite to run