diff options
author | Bruno Haible <bruno@clisp.org> | 2012-02-26 14:27:22 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-02-26 14:27:22 +0100 |
commit | 2d93933abca284c9f7ac8135f9dbb0e733309c5e (patch) | |
tree | 7d385cc869b01432fffb50b945254c62003d878c /tests/test-roundf-ieee.c | |
parent | 12f9bff77c13f51ace450fcfbc895f024de2d8a1 (diff) | |
download | gnulib-2d93933abca284c9f7ac8135f9dbb0e733309c5e.tar.gz |
roundf-ieee tests: More tests.
* tests/test-roundf-ieee.c: Include isnanf-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/roundf-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanf-nolibm.
Diffstat (limited to 'tests/test-roundf-ieee.c')
-rw-r--r-- | tests/test-roundf-ieee.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test-roundf-ieee.c b/tests/test-roundf-ieee.c index d41fa6f346..928cb0559d 100644 --- a/tests/test-roundf-ieee.c +++ b/tests/test-roundf-ieee.c @@ -18,7 +18,10 @@ #include <math.h> +#include "isnanf-nolibm.h" #include "minus-zero.h" +#include "infinity.h" +#include "nan.h" #include "macros.h" int @@ -39,5 +42,13 @@ main () ASSERT (!!signbit (roundf (-0.3f)) == !!signbit (minus_zerof)); ASSERT (!!signbit (roundf (-0.7f)) == !!signbit (minus_zerof)); + /* [MX] shaded specification in POSIX. */ + + /* NaN. */ + ASSERT (isnanf (roundf (NaNf ()))); + /* Infinity. */ + ASSERT (roundf (Infinityf ()) == Infinityf ()); + ASSERT (roundf (- Infinityf ()) == - Infinityf ()); + return 0; } |