X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-floorl.c;h=df745f4e390aa0afcaca66ebd9b193c737dc4f82;hb=a64f669549a2ed455e99e313d6207a3711e5e5bd;hp=8f10f4e4fd171a29f4d35dd3280d2e1f4b9003c4;hpb=e220635fc952c63b533873f2af39ec76aed4b4e3;p=gnulib.git diff --git a/tests/test-floorl.c b/tests/test-floorl.c index 8f10f4e4f..df745f4e3 100644 --- a/tests/test-floorl.c +++ b/tests/test-floorl.c @@ -1,5 +1,5 @@ /* Test of rounding towards negative infinity. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,23 +20,16 @@ #include -#include -#include +#include "signature.h" +SIGNATURE_CHECK (floorl, long double, (long double)); + +#include #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 "minus-zero.h" +#include "nan.h" +#include "macros.h" int main () @@ -47,7 +40,7 @@ main () /* Zero. */ ASSERT (floorl (0.0L) == 0.0L); - ASSERT (floorl (-0.0L) == 0.0L); + ASSERT (floorl (minus_zerol) == 0.0L); /* Positive numbers. */ ASSERT (floorl (0.3L) == 0.0L); ASSERT (floorl (0.7L) == 0.0L); @@ -73,7 +66,7 @@ main () ASSERT (floorl (1.0L / 0.0L) == 1.0L / 0.0L); ASSERT (floorl (-1.0L / 0.0L) == -1.0L / 0.0L); /* NaNs. */ - ASSERT (isnanl (floorl (0.0L / 0.0L))); + ASSERT (isnanl (floorl (NaNl ()))); return 0; }