mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Call abort
instead of exit
on test failure.
This raises a signal, so we can more easily catch it with gdb.
This commit is contained in:
parent
80f8458146
commit
64ddb7fff2
|
@ -44,7 +44,7 @@ static inline int srunner_ntests_failed(SRunner *r)
|
|||
#define ck_assert(ok) do { \
|
||||
if (!(ok)) { \
|
||||
fprintf(stderr, "%s:%d: failed `%s'\n", __FILE__, __LINE__, #ok); \
|
||||
exit(EXIT_FAILURE); \
|
||||
abort(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
@ -53,7 +53,7 @@ static inline int srunner_ntests_failed(SRunner *r)
|
|||
fprintf(stderr, "%s:%d: failed `%s': ", __FILE__, __LINE__, #ok); \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
fprintf(stderr, "\n"); \
|
||||
exit(EXIT_FAILURE); \
|
||||
abort(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
@ -61,7 +61,7 @@ static inline int srunner_ntests_failed(SRunner *r)
|
|||
fprintf(stderr, "%s:%d: ", __FILE__, __LINE__); \
|
||||
fprintf(stderr, __VA_ARGS__); \
|
||||
fprintf(stderr, "\n"); \
|
||||
exit(EXIT_FAILURE); \
|
||||
abort(); \
|
||||
} while (0)
|
||||
|
||||
#endif // CHECK_COMPAT_H
|
||||
|
|
Loading…
Reference in New Issue
Block a user