[update] IMPLEMENTATION_ define once
This commit is contained in:
+11
-5
@@ -328,20 +328,17 @@ extern char *varHK_EQ, *varHK_TR, *varHK_RN, *varHK_DN, *varHK_OK, *varHK_FL, *v
|
||||
free(buf);\
|
||||
}while(0)
|
||||
|
||||
|
||||
#define LOG(...) PRINTF(__VA_ARGS__)
|
||||
|
||||
#define PRINT_LOC(fmt, ...) \
|
||||
PRINTF( "%s:%d:%s(): " fmt, __FILE__, __LINE__, __func__, __VA_ARGS__)
|
||||
|
||||
|
||||
#define PRINT_HK_C(color,hk,fmt,...)\
|
||||
PRINTF("%s%s%s" fmt, color,hk,colors_f[k_DEFAULT],__VA_ARGS__)
|
||||
|
||||
#define PRINT_DEBUG(fmt, ...)\
|
||||
do{ if(debug) PRINT_LOC(fmt, __VA_ARGS__);} while(0)
|
||||
|
||||
|
||||
/*
|
||||
* to skip the bloc test function
|
||||
*/
|
||||
@@ -350,7 +347,6 @@ extern char *varHK_EQ, *varHK_TR, *varHK_RN, *varHK_DN, *varHK_OK, *varHK_FL, *v
|
||||
PRINT_LOC("%s\n\n" DEFAULT_K," Skiped "); return;
|
||||
|
||||
|
||||
|
||||
struct func {
|
||||
char *name;
|
||||
void (*run)(void);
|
||||
@@ -1147,7 +1143,9 @@ do{
|
||||
|
||||
#include "ftest/ftest.h"
|
||||
|
||||
#ifndef min
|
||||
#define min(a,b) (((a)<(b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* only expect
|
||||
@@ -2054,6 +2052,7 @@ __attribute__((constructor)) void create_str_print_variables ## namefunction(){\
|
||||
|
||||
|
||||
|
||||
#ifndef IMPLEMENTATION_TOOLS
|
||||
#define IMPLEMENTATION_TOOLS()\
|
||||
\
|
||||
GEN_TO_STR_N(TYPE_CHAR,2,"%c")\
|
||||
@@ -2173,9 +2172,10 @@ long diff_timespec_nanoseconds(struct timespec time_stop, struct timespec time_s
|
||||
}\
|
||||
\
|
||||
|
||||
#endif /* IMPLEMENTATION_TOOLS */
|
||||
|
||||
|
||||
|
||||
#ifndef IMPLEMENTATION_PROGRESS_BAR
|
||||
#define IMPLEMENTATION_PROGRESS_BAR()\
|
||||
\
|
||||
static struct winsize w;\
|
||||
@@ -2325,6 +2325,8 @@ void bar_progress_stop()\
|
||||
set_window_height_for_bar_progress(w.ws_row);\
|
||||
}\
|
||||
|
||||
#endif /* IMPLEMENTATION_PROGRESS_BAR */
|
||||
|
||||
/* implementation ftest */
|
||||
|
||||
|
||||
@@ -2698,6 +2700,7 @@ bool is_in_array_##type(type *array, type val){\
|
||||
|
||||
|
||||
|
||||
#ifndef IMPLEMENTATION_FTEST
|
||||
#define IMPLEMENTATION_FTEST() \
|
||||
\
|
||||
IMPLEMENTATION_TOOLS()\
|
||||
@@ -3914,6 +3917,7 @@ purge_tests() \
|
||||
\
|
||||
} \
|
||||
|
||||
#endif /* IMPLEMENTATION_FTEST */
|
||||
|
||||
/* implementation fmock */
|
||||
|
||||
@@ -3951,6 +3955,7 @@ purge_tests() \
|
||||
|
||||
//char *colors_f[]={DEFAULT_K, RED_K, GREEN_K, YELLOW_K, BLUE_K, ""};
|
||||
|
||||
#ifndef IMPLEMENTATION_FMOCK
|
||||
#define IMPLEMENTATION_FMOCK() \
|
||||
\
|
||||
size_t count_f_mock_wished=0; \
|
||||
@@ -4338,3 +4343,4 @@ __attribute__((destructor)) \
|
||||
\
|
||||
} \
|
||||
|
||||
#endif /* IMPLEMENTATION_FMOCK */
|
||||
|
||||
Reference in New Issue
Block a user