X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-rintl.c;h=bed5756109b51b18c1c0699d5e95971eab4167fc;hb=25b6b5120113989e0b91de9d0b75d3d625bbc753;hp=a960eaa419e0612e4bfe2bc3d3700d24bc48ce29;hpb=1602f0afed21be664fcf5c42d59db07cc22c56d6;p=gnulib.git diff --git a/tests/test-rintl.c b/tests/test-rintl.c index a960eaa41..bed575610 100644 --- a/tests/test-rintl.c +++ b/tests/test-rintl.c @@ -33,6 +33,18 @@ SIGNATURE_CHECK (rintl, long double, (long double)); #include "nan.h" #include "macros.h" +#undef INFINITY +#undef NAN + +#define DOUBLE long double +#define ISNAN isnanl +#define INFINITY Infinityl () +#define NAN NaNl () +#define L_(literal) literal##L +#define RINT rintl +#define RANDOM randoml +#include "test-rint.h" + int main () { @@ -80,11 +92,8 @@ main () ASSERT (rintl (-65536.0L) == -65536.0L); ASSERT (rintl (-65536.001L) == -65536.0L); ASSERT (rintl (-2.341e31L) == -2.341e31L); - /* Infinite numbers. */ - ASSERT (rintl (Infinityl ()) == Infinityl ()); - ASSERT (rintl (- Infinityl ()) == - Infinityl ()); - /* NaNs. */ - ASSERT (isnanl (rintl (NaNl ()))); + + test_function (); return 0; }