X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-sprintf-posix.c;h=6416d85a379a105b2544a086b2c6ed85e1d1a0d3;hb=11dbc24bbfd94e0e8d36754fe17bb1fdeb58fe5e;hp=bca3b1c6d2b6168cb8d2e467ae79153b6433a1cb;hpb=b1f8b701ad9487772a08e694c3e96555429aba60;p=gnulib.git diff --git a/tests/test-sprintf-posix.c b/tests/test-sprintf-posix.c index bca3b1c6d..6416d85a3 100644 --- a/tests/test-sprintf-posix.c +++ b/tests/test-sprintf-posix.c @@ -17,18 +17,28 @@ /* Written by Bruno Haible , 2007. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include +#include #include +#include #include #include #include -#define ASSERT(expr) if (!(expr)) abort (); +#define SIZEOF(array) (sizeof (array) / sizeof (array[0])) +#define ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + abort (); \ + } \ + } \ + while (0) #include "test-sprintf-posix.h"