Refactor common macros used in tests.
[gnulib.git] / tests / test-dprintf-posix.c
index 9cedc1c..341ece2 100644 (file)
@@ -25,20 +25,9 @@ SIGNATURE_CHECK (dprintf, int, (int, const char *, ...));
 
 #include <stddef.h>
 #include <stdint.h>
-#include <stdlib.h>
 #include <string.h>
 
-#define ASSERT(expr) \
-  do                                                                         \
-    {                                                                        \
-      if (!(expr))                                                           \
-        {                                                                    \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          fflush (stderr);                                                   \
-          abort ();                                                          \
-        }                                                                    \
-    }                                                                        \
-  while (0)
+#include "macros.h"
 
 static void
 test_function (int (*my_dprintf) (int, const char *, ...))