comparison tests/test-mbscasestr3.c @ 8754:1f57552cdb11

Better ASSERT macro.
author Bruno Haible <bruno@clisp.org>
date Sun, 29 Apr 2007 09:15:13 +0000
parents 09c7b4be2238
children 633babea5f62
comparison
equal deleted inserted replaced
8753:10d7922803f5 8754:1f57552cdb11
22 #endif 22 #endif
23 23
24 #include <string.h> 24 #include <string.h>
25 25
26 #include <locale.h> 26 #include <locale.h>
27 #include <stdio.h>
27 #include <stdlib.h> 28 #include <stdlib.h>
28 29
29 #define ASSERT(expr) if (!(expr)) abort (); 30 #define ASSERT(expr) \
31 do \
32 { \
33 if (!(expr)) \
34 { \
35 fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
36 abort (); \
37 } \
38 } \
39 while (0)
30 40
31 int 41 int
32 main () 42 main ()
33 { 43 {
34 /* configure should already have checked that the locale is supported. */ 44 /* configure should already have checked that the locale is supported. */