changeset 16425:e055691d062c

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.
author Bruno Haible <bruno@clisp.org>
date Sun, 26 Feb 2012 14:25:39 +0100
parents 321e99caa67f
children da3714005967
files ChangeLog modules/ceilf-ieee-tests tests/test-ceilf-ieee.c
diffstat 3 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- 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
 
--- a/tests/test-ceilf-ieee.c
+++ b/tests/test-ceilf-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"
 
 /* If IEEE compliance was not requested, the ICC compiler inlines its
@@ -52,5 +55,13 @@
   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;
 }