Refactor common macros used in tests.
[gnulib.git] / tests / test-memrchr.c
index d9128e7..e768daf 100644 (file)
 #include "signature.h"
 SIGNATURE_CHECK (memrchr, 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.  */