ceilf-ieee tests: More tests.
authorBruno Haible <bruno@clisp.org>
Sun, 26 Feb 2012 13:25:39 +0000 (14:25 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 26 Feb 2012 13:25:39 +0000 (14:25 +0100)
* 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
modules/ceilf-ieee-tests
tests/test-ceilf-ieee.c

index 50428a0..e238131 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2012-02-26  Bruno Haible  <bruno@clisp.org>
 
+       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.
index 4b87667..33e7be7 100644 (file)
@@ -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
 
index c94c856..63de131 100644 (file)
 
 #include <math.h>
 
+#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;
 }