fixed flaws in t/t.h

This commit is contained in:
hyunghwan.chung 2019-05-03 07:23:48 +00:00
parent ac79225bb4
commit 235be5b6d9
3 changed files with 6 additions and 11 deletions

View File

@ -4,7 +4,7 @@ AM_CFLAGS = $(PTHREAD_CFLAGS)
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-I$(abs_builddir) \ -I$(abs_builddir) \
-I$(abs_builddir)../lib \ -I$(abs_builddir)/../lib \
-I$(abs_srcdir) \ -I$(abs_srcdir) \
-I$(abs_srcdir)/../lib \ -I$(abs_srcdir)/../lib \
-I$(includedir) -I$(includedir)

View File

@ -336,6 +336,7 @@ AUTOMAKE_OPTIONS = nostdinc
AM_CFLAGS = $(PTHREAD_CFLAGS) AM_CFLAGS = $(PTHREAD_CFLAGS)
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-I$(abs_builddir) \ -I$(abs_builddir) \
-I$(abs_builddir)/../lib \
-I$(abs_srcdir) \ -I$(abs_srcdir) \
-I$(abs_srcdir)/../lib \ -I$(abs_srcdir)/../lib \
-I$(includedir) -I$(includedir)

View File

@ -4,19 +4,13 @@
#include <stdio.h> #include <stdio.h>
#if defined(__STDC_VERSION__) && (__STDC_VERSION__>=199901L) #if defined(__STDC_VERSION__) && (__STDC_VERSION__>=199901L)
# define T_ASSERT_FAIL1(msg1) printf("FAILURE in %s[%d] - %s\n", __func__, # define T_ASSERT_FAIL1(msg1) printf("FAILURE in %s[%d] - %s\n", __func__, (int)__LINE__, msg1)
(int)__LINE__, msg1) # define T_ASSERT_FAIL2(msg1,msg2) printf("FAILURE in %s[%d] - %s - %s\n", __func__, (int)__LINE__, msg1, msg2)
# define T_ASSERT_FAIL2(msg1,msg2) printf("FAILURE in %s[%d] - %s - %s\n",
__func__, (int)__LINE__, msg1, msg2)
#else #else
# define T_ASSERT_FAIL1(msg1) printf("FAILURE in %s[%d] - %s\n", __FILE__, # define T_ASSERT_FAIL1(msg1) printf("FAILURE in %s[%d] - %s\n", __FILE__, (int)__LINE__, msg1)
(int)__LINE__, msg1) # define T_ASSERT_FAIL2(msg1,msg2) printf("FAILURE in %s[%d] - %s - %s\n", __FILE__, (int)__LINE__, msg1, msg2)
# define T_ASSERT_FAIL2(msg1,msg2) printf("FAILURE in %s[%d] - %s - %s\n",
__FILE__, (int)__LINE__, msg1, msg2)
#endif #endif
#define T_ASSERT1(test,msg1) do { if (!(test)) { T_ASSERT_FAIL1(msg1); goto oops; } } while(0) #define T_ASSERT1(test,msg1) do { if (!(test)) { T_ASSERT_FAIL1(msg1); goto oops; } } while(0)
#define T_ASSERT2(test,msg1,msg2) do { if (!(test)) { T_ASSERT_FAIL2(msg1,msg2); goto oops; } } while(0) #define T_ASSERT2(test,msg1,msg2) do { if (!(test)) { T_ASSERT_FAIL2(msg1,msg2); goto oops; } } while(0)