X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-truncl.c;h=3b36ea7c46d0b74a05addc3e9d0217639912d09d;hb=89ae4589dd58d12e7cbcf0e92c1d828c1e430f97;hp=aad677d6c67a4ef90912202f7445a6fb963c6af8;hpb=b7cb23a66cd14b33c65e4fc95cbc5e6a4ed51fee;p=gnulib.git diff --git a/tests/test-truncl.c b/tests/test-truncl.c index aad677d6c..3b36ea7c4 100644 --- a/tests/test-truncl.c +++ b/tests/test-truncl.c @@ -20,23 +20,27 @@ #include +#include "signature.h" +SIGNATURE_CHECK (truncl, long double, (long double)); + #include #include #include #include "fpucw.h" #include "isnanl-nolibm.h" +#include "nan.h" #define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ + do \ + { \ + if (!(expr)) \ + { \ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ + fflush (stderr); \ + abort (); \ + } \ + } \ while (0) /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. @@ -89,7 +93,7 @@ main () ASSERT (truncl (1.0L / 0.0L) == 1.0L / 0.0L); ASSERT (truncl (-1.0L / 0.0L) == -1.0L / 0.0L); /* NaNs. */ - ASSERT (isnanl (truncl (0.0L / 0.0L))); + ASSERT (isnanl (truncl (NaNl ()))); return 0; }