]> Savannah Git Hosting - gnulib.git/commitdiff
truncl-ieee tests: More tests.
authorBruno Haible <bruno@clisp.org>
Sun, 26 Feb 2012 13:26:56 +0000 (14:26 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 26 Feb 2012 13:26:56 +0000 (14:26 +0100)
* 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.

ChangeLog
modules/truncl-ieee-tests
tests/test-truncl-ieee.c

index d1679b34a83e0eb57b1ec5e9060907cbc638a987..2b86024533fd795851e566865d23044d38f94bae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index a2fed3fdf5f01394ae33d2a6a4688f69359affe5..478e9b144855bccd9e85cd0fecf638b2f5720c38 100644 (file)
@@ -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
 
index 74d919a44a21afbf1a6ab99a55a6bd818ae1d2a1..d3eb10ed5081588ea9909266442a4b85788aad9a 100644 (file)
 #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;
 }