ucx/test.h

changeset 69
fb59270b1de3
parent 33
9c219a62070d
child 70
6721482eaf8e
     1.1 --- a/ucx/test.h	Thu Oct 11 16:29:30 2012 +0200
     1.2 +++ b/ucx/test.h	Fri Oct 12 10:54:55 2012 +0200
     1.3 @@ -33,6 +33,7 @@
     1.4  #ifndef TEST_H
     1.5  #define	TEST_H
     1.6  
     1.7 +#include "ucx.h"
     1.8  #include <stdio.h>
     1.9  #include <string.h>
    1.10  #include <setjmp.h>
    1.11 @@ -42,6 +43,10 @@
    1.12  extern "C" {
    1.13  #endif
    1.14  
    1.15 +#ifndef __FUNCTION__
    1.16 +#define __FUNCTION__ __func__
    1.17 +#endif
    1.18 +
    1.19  typedef struct {
    1.20      unsigned int success;
    1.21      unsigned int failure;
    1.22 @@ -60,7 +65,7 @@
    1.23  #define UCX_TEST_IMPLEMENT(name) void name(UcxTestSuite* _suite_,FILE *_output_)
    1.24  
    1.25  #define UCX_TEST_BEGIN fwrite("Running ", 1, 8, _output_);\
    1.26 -        fwrite(__func__, 1, strlen(__func__), _output_);\
    1.27 +        fwrite(__FUNCTION__, 1, strlen(__FUNCTION__), _output_);\
    1.28          fwrite("... ", 1, 4, _output_);\
    1.29          jmp_buf _env_; \
    1.30          if (!setjmp(_env_)) {

mercurial