Refactor common macros used in tests.
[gnulib.git] / tests / test-fwritable.c
index 34f2427..f4c4082 100644 (file)
@@ -21,7 +21,8 @@
 #include "fwritable.h"
 
 #include <stdio.h>
-#include <stdlib.h>
+
+#include "macros.h"
 
 /* None of the files accessed by this test are large, so disable the
    fseek link warning if we are not using the gnulib fseek module.  */
 # undef fseek
 #endif
 
-#define ASSERT(expr) \
-  do                                                                         \
-    {                                                                        \
-      if (!(expr))                                                           \
-        {                                                                    \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          fflush (stderr);                                                   \
-          abort ();                                                          \
-        }                                                                    \
-    }                                                                        \
-  while (0)
-
 #define TESTFILE "t-fwritable.tmp"
 
 int