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/test-snprintf.c | |
parent | 17fecfc4d6363d6d4127a97b42f0acbbcbd60a44 (diff) | |
download | gnulib-75d146361fe980e1e1bbb9639edc6fbed5345e82.tar.gz |
Better ASSERT macro.
Diffstat (limited to 'tests/test-snprintf.c')
-rw-r--r-- | tests/test-snprintf.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/test-snprintf.c b/tests/test-snprintf.c index 7b3e9b49e8..c1235ef03c 100644 --- a/tests/test-snprintf.c +++ b/tests/test-snprintf.c @@ -26,7 +26,16 @@ #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 (int argc, char *argv[]) |