X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-frexpl-ieee.c;h=1afc7e2e6adf645891f34ab21c39a5d2a29e8212;hb=5f70dcfc4f65198adbce63a01a17f18b1627beee;hp=c9fae568a983b50f0309ed0f663e1c50d1c6d975;hpb=e300fea773aedae5711c0157e7dc8991b87e2872;p=gnulib.git diff --git a/tests/test-frexpl-ieee.c b/tests/test-frexpl-ieee.c index c9fae568a..1afc7e2e6 100644 --- a/tests/test-frexpl-ieee.c +++ b/tests/test-frexpl-ieee.c @@ -24,50 +24,22 @@ #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 MINUS_ZERO minus_zerol +#define FREXP frexpl +#include "test-frexp-ieee.h" + int main () { - /* [MX] shaded specification in POSIX. */ - - /* NaN. */ - { - int exp = -9999; - long double mantissa; - mantissa = frexpl (NaNl (), &exp); - ASSERT (isnanl (mantissa)); - } - - /* Signed zero. */ - { - int exp = -9999; - long double mantissa; - mantissa = frexpl (0.0L, &exp); - ASSERT (mantissa == 0.0L); - ASSERT (!signbit (mantissa)); - ASSERT (exp == 0); - } - { - int exp = -9999; - long double mantissa; - mantissa = frexpl (minus_zerol, &exp); - ASSERT (mantissa == 0.0L); - ASSERT (!!signbit (mantissa) == !!signbit (minus_zerol)); - ASSERT (exp == 0); - } - - /* Infinity. */ - { - int exp = -9999; - long double mantissa; - mantissa = frexpl (Infinityl (), &exp); - ASSERT (mantissa == Infinityl ()); - } - { - int exp = -9999; - long double mantissa; - mantissa = frexpl (- Infinityl (), &exp); - ASSERT (mantissa == - Infinityl ()); - } + test_function (); return 0; }