Refactor common macros used in tests.
[gnulib.git] / tests / test-flock.c
index a8a615e..beae8c8 100644 (file)
 SIGNATURE_CHECK (flock, int, (int, int));
 
 #include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <unistd.h>
 #include <errno.h>
 
-#define ASSERT(expr) \
-  do                                                                    \
-    {                                                                   \
-      if (!(expr))                                                      \
-        {                                                               \
-          fprintf (stderr, "%s:%d: assertion failed, errno = %d\n",     \
-                   __FILE__, __LINE__, errno);                          \
-          fflush (stderr);                                              \
-          abort ();                                                     \
-        }                                                               \
-    }                                                                   \
-  while (0)
+#include "macros.h"
 
 static void
 test_shared (const char *file, int fd)