Mercurial > hg > octave-lojdl > gnulib-hg
diff tests/test-memchr.c @ 12496:a48d3d749ca5
Refactor common macros used in tests.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 24 Dec 2009 21:01:42 +0100 |
parents | 33ab12a7cea2 |
children | 442a82a053da |
line wrap: on
line diff
--- a/tests/test-memchr.c +++ b/tests/test-memchr.c @@ -22,22 +22,10 @@ #include "signature.h" SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t)); -#include <stdio.h> #include <stdlib.h> #include "zerosize-ptr.h" - -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ - while (0) +#include "macros.h" /* Calculating void * + int is not portable, so this wrapper converts to char * to make the tests easier to write. */