diff options
author | Bruno Haible <bruno@clisp.org> | 2007-04-29 09:15:13 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2007-04-29 09:15:13 +0000 |
commit | 75d146361fe980e1e1bbb9639edc6fbed5345e82 (patch) | |
tree | 0b0ae95b2c7882d40722dce902aa699790edaa12 /tests/uniconv/test-u16-strconv-to-enc.c | |
parent | 17fecfc4d6363d6d4127a97b42f0acbbcbd60a44 (diff) | |
download | gnulib-75d146361fe980e1e1bbb9639edc6fbed5345e82.tar.gz |
Better ASSERT macro.
Diffstat (limited to 'tests/uniconv/test-u16-strconv-to-enc.c')
-rw-r--r-- | tests/uniconv/test-u16-strconv-to-enc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/uniconv/test-u16-strconv-to-enc.c b/tests/uniconv/test-u16-strconv-to-enc.c index c8b9df0aac..35a8eb7b96 100644 --- a/tests/uniconv/test-u16-strconv-to-enc.c +++ b/tests/uniconv/test-u16-strconv-to-enc.c @@ -24,11 +24,21 @@ #include "uniconv.h" #include <errno.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> #define SIZEOF(array) (sizeof (array) / sizeof (array[0])) -#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 () |