--- a/test/main.c Mon Aug 05 14:38:37 2013 +0200 +++ b/test/main.c Tue Aug 06 10:22:03 2013 +0200 @@ -41,39 +41,39 @@ #include "prop_tests.h" #include "buffer_tests.h" -UCX_TEST_IMPLEMENT(testTestSuitePositive) { +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuitePositive) { UCX_TEST_BEGIN UCX_TEST_ASSERT(2*2 == 4, "the test framework fails"); UCX_TEST_END } -UCX_TEST_IMPLEMENT(testTestSuiteNegative) { +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuiteNegative) { UCX_TEST_BEGIN UCX_TEST_ASSERT(2*(-2) == 4, "the test framework works"); UCX_TEST_END } -UCX_TEST_SUBROUTINE(testTestSuiteRoutineRoutine, float f) { +UCX_EXTERN UCX_TEST_SUBROUTINE(testTestSuiteRoutineRoutine, float f) { UCX_TEST_ASSERT(f == 3.14f, "calling routine in a routine fails"); } -UCX_TEST_SUBROUTINE(testTestSuiteRoutine2Param, int i, float f) { +UCX_EXTERN UCX_TEST_SUBROUTINE(testTestSuiteRoutine2Param, int i, float f) { UCX_TEST_ASSERT(i == 42, "two parameter routine fails"); UCX_TEST_CALL_SUBROUTINE(testTestSuiteRoutineRoutine, f); } -UCX_TEST_SUBROUTINE(testTestSuiteRoutineSuccess, int* i) { +UCX_EXTERN UCX_TEST_SUBROUTINE(testTestSuiteRoutineSuccess, int* i) { *i += 2; UCX_TEST_ASSERT(*i==4, "the test framework fails"); } -UCX_TEST_SUBROUTINE(testTestSuiteRoutineFailure, int* i) { +UCX_EXTERN UCX_TEST_SUBROUTINE(testTestSuiteRoutineFailure, int* i) { *i += 2; // Next test shall fail! UCX_TEST_ASSERT(*i==4, "the test framework works"); } -UCX_TEST_IMPLEMENT(testTestSuiteRoutinePositive) { +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuiteRoutinePositive) { int i = 2; UCX_TEST_BEGIN UCX_TEST_CALL_SUBROUTINE(testTestSuiteRoutineSuccess, &i); @@ -81,7 +81,7 @@ UCX_TEST_END } -UCX_TEST_IMPLEMENT(testTestSuiteRoutineNegative) { +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuiteRoutineNegative) { int i = 0; UCX_TEST_BEGIN UCX_TEST_CALL_SUBROUTINE(testTestSuiteRoutineFailure, &i); @@ -89,7 +89,7 @@ UCX_TEST_END } -UCX_TEST_IMPLEMENT(testTestSuiteRoutineMultiparam) { +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuiteRoutineMultiparam) { UCX_TEST_BEGIN UCX_TEST_CALL_SUBROUTINE(testTestSuiteRoutine2Param, 42, 3.14f); UCX_TEST_END