Refactor common macros used in tests.
[gnulib.git] / tests / test-fopen.h
index 6ba923b..106f491 100644 (file)
 /* Include <config.h> and a form of <stdio.h> first.  */
 
 #include <errno.h>
-#include <stdlib.h>
 #include <unistd.h>
 
-#define ASSERT(expr) \
-  do                                                                         \
-    {                                                                        \
-      if (!(expr))                                                           \
-        {                                                                    \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          fflush (stderr);                                                   \
-          abort ();                                                          \
-        }                                                                    \
-    }                                                                        \
-  while (0)
+#include "macros.h"
 
 /* Test fopen.  Assumes BASE is defined.  */