X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-ceilf-ieee.c;h=63de1318b8f5796b943cf2eebe8a37084c9e3989;hb=dd91a295844a6e89ce67087164ea0f2e979b4b70;hp=15a9fbf49f095bddb8f7763a73af8ef28c1a89c1;hpb=3be902cd0bdb566284ceb3f6fae538391da1faed;p=gnulib.git diff --git a/tests/test-ceilf-ieee.c b/tests/test-ceilf-ieee.c index 15a9fbf49..63de1318b 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 Free Software Foundation, Inc. + Copyright (C) 2010-2012 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; }