summaryrefslogtreecommitdiff
path: root/tests/test-mbsrchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-mbsrchr.c')
-rw-r--r--tests/test-mbsrchr.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test-mbsrchr.c b/tests/test-mbsrchr.c
index 58cd6763f2..35b865c6cb 100644
--- a/tests/test-mbsrchr.c
+++ b/tests/test-mbsrchr.c
@@ -24,9 +24,19 @@
#include <string.h>
#include <locale.h>
+#include <stdio.h>
#include <stdlib.h>
-#define ASSERT(expr) if (!(expr)) abort ();
+#define ASSERT(expr) \
+ do \
+ { \
+ if (!(expr)) \
+ { \
+ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+ abort (); \
+ } \
+ } \
+ while (0)
int
main ()