From 75d146361fe980e1e1bbb9639edc6fbed5345e82 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 29 Apr 2007 09:15:13 +0000 Subject: Better ASSERT macro. --- tests/test-mbsstr1.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tests/test-mbsstr1.c') diff --git a/tests/test-mbsstr1.c b/tests/test-mbsstr1.c index 549121206e..d1b079a712 100644 --- a/tests/test-mbsstr1.c +++ b/tests/test-mbsstr1.c @@ -23,9 +23,19 @@ #include +#include #include -#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 () -- cgit v1.2.1