X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-ceilf-ieee.c;h=3f3aaae32a09433b450d433b3acf89a3b8f2459d;hb=e7086a9a301ffcfef17edbcba9e7c0312c33f7a8;hp=c071265795c8804504a867f309cc88a88d67a5ae;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/tests/test-ceilf-ieee.c b/tests/test-ceilf-ieee.c index c07126579..3f3aaae32 100644 --- a/tests/test-ceilf-ieee.c +++ b/tests/test-ceilf-ieee.c @@ -1,5 +1,5 @@ /* Test of rounding towards positive infinity. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2013 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,7 +18,10 @@ #include +#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; }