diff options
author | Bruno Haible <bruno@clisp.org> | 2012-02-26 14:26:56 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-02-26 14:26:56 +0100 |
commit | 12f9bff77c13f51ace450fcfbc895f024de2d8a1 (patch) | |
tree | 156e6c259ca5b3e60e6f7b11875c9d4cafff9b58 | |
parent | 0248e75ce939a386964b243089f3b8a49159715f (diff) | |
download | gnulib-12f9bff77c13f51ace450fcfbc895f024de2d8a1.tar.gz |
truncl-ieee tests: More tests.
* tests/test-truncl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h.
(main): Add tests for [MX] shaded specification in POSIX.
* modules/truncl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h.
(Depends-on): Add isnanl-nolibm.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | modules/truncl-ieee-tests | 3 | ||||
-rw-r--r-- | tests/test-truncl-ieee.c | 11 |
3 files changed, 20 insertions, 0 deletions
@@ -1,5 +1,11 @@ 2012-02-26 Bruno Haible <bruno@clisp.org> + truncl-ieee tests: More tests. + * tests/test-truncl-ieee.c: Include isnanl-nolibm.h, infinity.h, nan.h. + (main): Add tests for [MX] shaded specification in POSIX. + * modules/truncl-ieee-tests (Files): Add tests/infinity.h, tests/nan.h. + (Depends-on): Add isnanl-nolibm. + trunc-ieee tests: More tests. * tests/test-trunc-ieee.c: Include isnand-nolibm.h, infinity.h, nan.h. (main): Add tests for [MX] shaded specification in POSIX. diff --git a/modules/truncl-ieee-tests b/modules/truncl-ieee-tests index a2fed3fdf5..478e9b1448 100644 --- a/modules/truncl-ieee-tests +++ b/modules/truncl-ieee-tests @@ -1,10 +1,13 @@ Files: tests/test-truncl-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-truncl-ieee.c b/tests/test-truncl-ieee.c index 74d919a44a..d3eb10ed50 100644 --- a/tests/test-truncl-ieee.c +++ b/tests/test-truncl-ieee.c @@ -19,7 +19,10 @@ #include <math.h> #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 (truncl (-0.3L)) == !!signbit (minus_zerol)); ASSERT (!!signbit (truncl (-0.7L)) == !!signbit (minus_zerol)); + /* [MX] shaded specification in POSIX. */ + + /* NaN. */ + ASSERT (isnanl (truncl (NaNl ()))); + /* Infinity. */ + ASSERT (truncl (Infinityl ()) == Infinityl ()); + ASSERT (truncl (- Infinityl ()) == - Infinityl ()); + return 0; } |