test/main.c

changeset 131
fc3af16818a3
parent 123
7fb0f74517c5
child 134
4d320dc3a7af
     1.1 --- a/test/main.c	Mon Aug 05 14:38:37 2013 +0200
     1.2 +++ b/test/main.c	Tue Aug 06 10:22:03 2013 +0200
     1.3 @@ -41,39 +41,39 @@
     1.4  #include "prop_tests.h"
     1.5  #include "buffer_tests.h"
     1.6  
     1.7 -UCX_TEST_IMPLEMENT(testTestSuitePositive) {
     1.8 +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuitePositive) {
     1.9      UCX_TEST_BEGIN
    1.10      UCX_TEST_ASSERT(2*2 == 4, "the test framework fails");
    1.11      UCX_TEST_END
    1.12  }
    1.13  
    1.14 -UCX_TEST_IMPLEMENT(testTestSuiteNegative) {
    1.15 +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuiteNegative) {
    1.16      UCX_TEST_BEGIN
    1.17      UCX_TEST_ASSERT(2*(-2) == 4, "the test framework works");
    1.18      UCX_TEST_END
    1.19  }
    1.20  
    1.21 -UCX_TEST_SUBROUTINE(testTestSuiteRoutineRoutine, float f) {
    1.22 +UCX_EXTERN UCX_TEST_SUBROUTINE(testTestSuiteRoutineRoutine, float f) {
    1.23      UCX_TEST_ASSERT(f == 3.14f, "calling routine in a routine fails");
    1.24  }
    1.25  
    1.26 -UCX_TEST_SUBROUTINE(testTestSuiteRoutine2Param, int i, float f) {
    1.27 +UCX_EXTERN UCX_TEST_SUBROUTINE(testTestSuiteRoutine2Param, int i, float f) {
    1.28      UCX_TEST_ASSERT(i == 42, "two parameter routine fails");
    1.29      UCX_TEST_CALL_SUBROUTINE(testTestSuiteRoutineRoutine, f);
    1.30  }
    1.31  
    1.32 -UCX_TEST_SUBROUTINE(testTestSuiteRoutineSuccess, int* i) {
    1.33 +UCX_EXTERN UCX_TEST_SUBROUTINE(testTestSuiteRoutineSuccess, int* i) {
    1.34      *i += 2;
    1.35      UCX_TEST_ASSERT(*i==4, "the test framework fails");
    1.36  }
    1.37  
    1.38 -UCX_TEST_SUBROUTINE(testTestSuiteRoutineFailure, int* i) {
    1.39 +UCX_EXTERN UCX_TEST_SUBROUTINE(testTestSuiteRoutineFailure, int* i) {
    1.40      *i += 2;
    1.41      // Next test shall fail!
    1.42      UCX_TEST_ASSERT(*i==4, "the test framework works");
    1.43  }
    1.44  
    1.45 -UCX_TEST_IMPLEMENT(testTestSuiteRoutinePositive) {
    1.46 +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuiteRoutinePositive) {
    1.47      int i = 2;
    1.48      UCX_TEST_BEGIN
    1.49      UCX_TEST_CALL_SUBROUTINE(testTestSuiteRoutineSuccess, &i);
    1.50 @@ -81,7 +81,7 @@
    1.51      UCX_TEST_END
    1.52  }
    1.53  
    1.54 -UCX_TEST_IMPLEMENT(testTestSuiteRoutineNegative) {
    1.55 +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuiteRoutineNegative) {
    1.56      int i = 0;
    1.57      UCX_TEST_BEGIN
    1.58      UCX_TEST_CALL_SUBROUTINE(testTestSuiteRoutineFailure, &i);
    1.59 @@ -89,7 +89,7 @@
    1.60      UCX_TEST_END
    1.61  }
    1.62  
    1.63 -UCX_TEST_IMPLEMENT(testTestSuiteRoutineMultiparam) {
    1.64 +UCX_EXTERN UCX_TEST_IMPLEMENT(testTestSuiteRoutineMultiparam) {
    1.65      UCX_TEST_BEGIN
    1.66      UCX_TEST_CALL_SUBROUTINE(testTestSuiteRoutine2Param, 42, 3.14f);
    1.67      UCX_TEST_END

mercurial