ucx/test.h

changeset 17
11dffb40cd91
parent 5
88625853ae74
child 70
88092b88ec00
--- a/ucx/test.h	Fri Aug 16 12:41:30 2013 +0200
+++ b/ucx/test.h	Sat Aug 17 12:04:04 2013 +0200
@@ -81,6 +81,7 @@
 #endif
 
 #ifndef __FUNCTION__
+
 /**
  * Alias for the <code>__func__</code> preprocessor macro.
  * Some compilers use <code>__func__</code> and others use __FUNC__.
@@ -90,21 +91,36 @@
 #define __FUNCTION__ __func__
 #endif
 
+/** Type for the UcxTestSuite. */
+typedef struct UcxTestSuite UcxTestSuite;
+
+/** Pointer to a test function. */
+typedef void(*UcxTest)(UcxTestSuite*,FILE*);
+
 /** Type for the internal list of test cases. */
 typedef struct UcxTestList UcxTestList;
-/** Type for the UcxTestSuite. */
-typedef struct UcxTestSuite UcxTestSuite;
-/** Pointer to a test function. */
-typedef void(*UcxTest)(UcxTestSuite*,FILE*);
+
+/** Structure for the internal list of test cases. */
+struct UcxTestList {
+    
+    /** Test case. */
+    UcxTest test;
+    
+    /** Pointer to the next list element. */
+    UcxTestList *next;
+};
 
 /**
  * A test suite containing multiple test cases.
  */
 struct UcxTestSuite {
+    
     /** The number of successful tests after the suite has been run. */
     unsigned int success;
+    
     /** The number of failed tests after the suite has been run. */
     unsigned int failure;
+    
     /**
      * Internal list of test cases.
      * Use ucx_test_register() to add tests to this list.
@@ -117,9 +133,10 @@
  * @return a new test suite
  */
 UcxTestSuite* ucx_test_suite_new();
+
 /**
  * Destroys a test suite.
- * @param the test suite to destroy
+ * @param suite the test suite to destroy
  */
 void ucx_test_suite_free(UcxTestSuite* suite);
 
@@ -132,6 +149,7 @@
  * <code>EXIT_FAILURE</code> on failure
  */
 int ucx_test_register(UcxTestSuite* suite, UcxTest test);
+
 /**
  * Runs a test suite and writes the test log to the specified stream.
  * @param suite the test suite to run

mercurial