summaryrefslogtreecommitdiff
path: root/tests/test-iconv.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-04-29 09:15:13 +0000
committerBruno Haible <bruno@clisp.org>2007-04-29 09:15:13 +0000
commit75d146361fe980e1e1bbb9639edc6fbed5345e82 (patch)
tree0b0ae95b2c7882d40722dce902aa699790edaa12 /tests/test-iconv.c
parent17fecfc4d6363d6d4127a97b42f0acbbcbd60a44 (diff)
downloadgnulib-75d146361fe980e1e1bbb9639edc6fbed5345e82.tar.gz
Better ASSERT macro.
Diffstat (limited to 'tests/test-iconv.c')
-rw-r--r--tests/test-iconv.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test-iconv.c b/tests/test-iconv.c
index 00157dad13..520b96b5a3 100644
--- a/tests/test-iconv.c
+++ b/tests/test-iconv.c
@@ -26,10 +26,20 @@
#endif
#include <errno.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.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 ()