Refactor common macros used in tests.
[gnulib.git] / tests / test-ftello.c
index 2af43f2..bde4e06 100644 (file)
@@ -23,9 +23,8 @@
 #include "signature.h"
 SIGNATURE_CHECK (ftello, off_t, (FILE *));
 
-#include <stdlib.h>
-
 #include "binary-io.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.  */
@@ -33,18 +32,6 @@ SIGNATURE_CHECK (ftello, off_t, (FILE *));
 # undef fseek
 #endif
 
-#define ASSERT(expr) \
-  do                                                                         \
-    {                                                                        \
-      if (!(expr))                                                           \
-        {                                                                    \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          fflush (stderr);                                                   \
-          abort ();                                                          \
-        }                                                                    \
-    }                                                                        \
-  while (0)
-
 #ifndef FUNC_UNGETC_BROKEN
 # define FUNC_UNGETC_BROKEN 0
 #endif