mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-25 20:28:27 +00:00
attempt to get reasons
This commit is contained in:
1 parent
3c1f41e575
commit
f9ed75d6b3
3 files changed
+9
-2
No files matched your search
+7
-2
@@ -65,15 +65,20 @@ static char *host_ip;
|
|||||||
|
|
||||||
static int s_num_tests = 0;
|
static int s_num_tests = 0;
|
||||||
|
|
||||||
#define ABORT() \
|
#ifdef NO_SLEEP_ABORT
|
||||||
usleep(500000); /* 500 ms, GH print reason */ \
|
#define ABORT() abort()
|
||||||
|
#else
|
||||||
|
#define ABORT() \
|
||||||
|
sleep(2); /* 2s, GH print reason */ \
|
||||||
abort();
|
abort();
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ASSERT(expr) \
|
#define ASSERT(expr) \
|
||||||
do { \
|
do { \
|
||||||
s_num_tests++; \
|
s_num_tests++; \
|
||||||
if (!(expr)) { \
|
if (!(expr)) { \
|
||||||
printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \
|
printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \
|
||||||
|
fflush(stdout); \
|
||||||
ABORT(); \
|
ABORT(); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ static int s_seg_sent = 0;
|
|||||||
s_num_tests++; \
|
s_num_tests++; \
|
||||||
if (!(expr)) { \
|
if (!(expr)) { \
|
||||||
printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \
|
printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \
|
||||||
|
fflush(stdout); \
|
||||||
ABORT(); \
|
ABORT(); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ static int s_num_tests = 0;
|
|||||||
s_num_tests++; \
|
s_num_tests++; \
|
||||||
if (!(expr)) { \
|
if (!(expr)) { \
|
||||||
printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \
|
printf("FAILURE %s:%d: %s\n", __FILE__, __LINE__, #expr); \
|
||||||
|
fflush(stdout); \
|
||||||
ABORT(); \
|
ABORT(); \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|||||||
Reference in new issue
Block a user