tests: use macros.h in more places
[gnulib.git] / tests / test-dirent-safer.c
index 8d5d529..045d29b 100644 (file)
@@ -23,7 +23,6 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <stdio.h>
-#include <stdlib.h>
 #include <unistd.h>
 
 #include "unistd-safer.h"
    duplicate the original stderr.  */
 
 #define BACKUP_STDERR_FILENO 10
-static FILE *myerr;
+#define ASSERT_STREAM myerr
+#include "macros.h"
 
-#define ASSERT(expr) \
-  do                                                                         \
-    {                                                                        \
-      if (!(expr))                                                           \
-        {                                                                    \
-          fprintf (myerr, "%s:%d: assertion failed\n", __FILE__, __LINE__);  \
-          fflush (myerr);                                                    \
-          abort ();                                                          \
-        }                                                                    \
-    }                                                                        \
-  while (0)
+static FILE *myerr;
 
 int
 main (void)