1.1 --- a/ucx/test.h Fri Feb 08 11:25:04 2013 +0100 1.2 +++ b/ucx/test.h Fri Feb 08 17:09:12 2013 +0100 1.3 @@ -37,7 +37,6 @@ 1.4 #include <stdio.h> 1.5 #include <string.h> 1.6 #include <setjmp.h> 1.7 -#include "list.h" 1.8 1.9 #ifdef __cplusplus 1.10 extern "C" { 1.11 @@ -47,18 +46,25 @@ 1.12 #define __FUNCTION__ __func__ 1.13 #endif 1.14 1.15 -typedef struct { 1.16 +typedef struct UcxTestList UcxTestList; 1.17 +typedef struct UcxTestSuite UcxTestSuite; 1.18 +typedef void(*UcxTest)(UcxTestSuite*,FILE*); 1.19 + 1.20 +struct UcxTestList{ 1.21 + UcxTest test; 1.22 + UcxTestList *next; 1.23 +}; 1.24 + 1.25 +struct UcxTestSuite { 1.26 unsigned int success; 1.27 unsigned int failure; 1.28 - UcxList *tests; 1.29 -} UcxTestSuite; 1.30 - 1.31 -typedef void(*UcxTest)(UcxTestSuite*,FILE*); 1.32 + UcxTestList *tests; 1.33 +}; 1.34 1.35 UcxTestSuite* ucx_test_suite_new(); 1.36 void ucx_test_suite_free(UcxTestSuite*); 1.37 1.38 -void ucx_test_register(UcxTestSuite*, UcxTest); 1.39 +int ucx_test_register(UcxTestSuite*, UcxTest); 1.40 void ucx_test_run(UcxTestSuite*, FILE*); 1.41 1.42 #define UCX_TEST_DECLARE(name) void name(UcxTestSuite*,FILE *)