From 191e3115779d71654da88a0d58d21dffbccf0b2b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 26 Feb 2012 14:25:39 +0100 Subject: [PATCH] ceilf-ieee tests: More tests. * tests/test-ceilf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h. (main): Add tests for [MX] shaded specification in POSIX. * modules/ceilf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h. (Depends-on): Add isnanf-nolibm. --- ChangeLog | 6 ++++++ modules/ceilf-ieee-tests | 3 +++ tests/test-ceilf-ieee.c | 11 +++++++++++ 3 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 50428a0e0..e23813126 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2012-02-26 Bruno Haible + ceilf-ieee tests: More tests. + * tests/test-ceilf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h. + (main): Add tests for [MX] shaded specification in POSIX. + * modules/ceilf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h. + (Depends-on): Add isnanf-nolibm. + 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. diff --git a/modules/ceilf-ieee-tests b/modules/ceilf-ieee-tests index 4b8766794..33e7be790 100644 --- a/modules/ceilf-ieee-tests +++ b/modules/ceilf-ieee-tests @@ -1,9 +1,12 @@ Files: tests/test-ceilf-ieee.c tests/minus-zero.h +tests/infinity.h +tests/nan.h tests/macros.h Depends-on: +isnanf-nolibm float signbit diff --git a/tests/test-ceilf-ieee.c b/tests/test-ceilf-ieee.c index c94c856c8..63de1318b 100644 --- a/tests/test-ceilf-ieee.c +++ b/tests/test-ceilf-ieee.c @@ -18,7 +18,10 @@ #include +#include "isnanf-nolibm.h" #include "minus-zero.h" +#include "infinity.h" +#include "nan.h" #include "macros.h" /* If IEEE compliance was not requested, the ICC compiler inlines its @@ -52,5 +55,13 @@ main (int argc, char **argv _GL_UNUSED) ASSERT (!!signbit (my_ceilf (-0.3f)) == !!signbit (minus_zerof)); ASSERT (!!signbit (my_ceilf (-0.7f)) == !!signbit (minus_zerof)); + /* [MX] shaded specification in POSIX. */ + + /* NaN. */ + ASSERT (isnanf (ceilf (NaNf ()))); + /* Infinity. */ + ASSERT (ceilf (Infinityf ()) == Infinityf ()); + ASSERT (ceilf (- Infinityf ()) == - Infinityf ()); + return 0; } -- 2.11.0