From d7a3eae30985f6d910a7c52669ca9c64f2c8159d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 26 Feb 2012 14:24:38 +0100 Subject: [PATCH] floorl-ieee tests: More tests. * tests/test-floorl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h. (main): Add tests for [MX] shaded specification in POSIX. * modules/floorl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h. (Depends-on): Add isnanl-nolibm. --- ChangeLog | 6 ++++++ modules/floorl-ieee-tests | 3 +++ tests/test-floorl-ieee.c | 11 +++++++++++ 3 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index f4c445bbe..50428a0e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2012-02-26 Bruno Haible + floorl-ieee tests: More tests. + * tests/test-floorl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h. + (main): Add tests for [MX] shaded specification in POSIX. + * modules/floorl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h. + (Depends-on): Add isnanl-nolibm. + floor-ieee tests: More tests. * tests/test-floor-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h. (main): Add tests for [MX] shaded specification in POSIX. diff --git a/modules/floorl-ieee-tests b/modules/floorl-ieee-tests index f60bbe68b..6b976abc4 100644 --- a/modules/floorl-ieee-tests +++ b/modules/floorl-ieee-tests @@ -1,10 +1,13 @@ Files: tests/test-floorl-ieee.c tests/minus-zero.h +tests/infinity.h +tests/nan.h tests/macros.h Depends-on: fpucw +isnanl-nolibm float signbit diff --git a/tests/test-floorl-ieee.c b/tests/test-floorl-ieee.c index 5d84269d1..24f9b775c 100644 --- a/tests/test-floorl-ieee.c +++ b/tests/test-floorl-ieee.c @@ -19,7 +19,10 @@ #include #include "fpucw.h" +#include "isnanl-nolibm.h" #include "minus-zero.h" +#include "infinity.h" +#include "nan.h" #include "macros.h" int @@ -44,5 +47,13 @@ main () ASSERT (!!signbit (floorl (-0.3L)) == !!signbit (minus_zerol)); ASSERT (!!signbit (floorl (-0.7L)) == !!signbit (minus_zerol)); + /* [MX] shaded specification in POSIX. */ + + /* NaN. */ + ASSERT (isnanl (floorl (NaNl ()))); + /* Infinity. */ + ASSERT (floorl (Infinityl ()) == Infinityl ()); + ASSERT (floorl (- Infinityl ()) == - Infinityl ()); + return 0; } -- 2.11.0