sys_times, sys_utsname: use include_next
[gnulib.git] / tests / test-roundl.c
index 51cd1cd..7b3e200 100644 (file)
 
 #include <math.h>
 
+#include "signature.h"
+SIGNATURE_CHECK (roundl, long double, (long double));
+
 #include <float.h>
-#include <stdio.h>
-#include <stdlib.h>
 
 #include "fpucw.h"
 #include "isnanl-nolibm.h"
-
-#define ASSERT(expr) \
-  do                                                                        \
-    {                                                                       \
-      if (!(expr))                                                          \
-        {                                                                   \
-          fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
-          fflush (stderr);                                                  \
-          abort ();                                                         \
-        }                                                                   \
-    }                                                                       \
-  while (0)
+#include "nan.h"
+#include "macros.h"
 
 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
    So we use minus_zero instead.
@@ -97,7 +88,7 @@ main ()
   ASSERT (roundl (1.0 / 0.0L) == 1.0 / 0.0L);
   ASSERT (roundl (-1.0 / 0.0L) == -1.0 / 0.0L);
   /* NaNs.  */
-  ASSERT (isnanl (roundl (0.0L / 0.0L)));
+  ASSERT (isnanl (roundl (NaNl ())));
 
   return 0;
 }