X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-roundf-ieee.c;h=a9f5ea24d3bd52250b9fee464cf745aea526e0d1;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=d41fa6f3465f044d52de8987fa0f5d1f35c26baa;hpb=341111f654709cd0295607a4abbe721495c77e90;p=gnulib.git diff --git a/tests/test-roundf-ieee.c b/tests/test-roundf-ieee.c index d41fa6f34..a9f5ea24d 100644 --- a/tests/test-roundf-ieee.c +++ b/tests/test-roundf-ieee.c @@ -1,5 +1,5 @@ /* Test of rounding to nearest, breaking ties away from zero. - Copyright (C) 2010-2012 Free Software Foundation, Inc. + Copyright (C) 2010-2014 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" int @@ -39,5 +42,13 @@ main () ASSERT (!!signbit (roundf (-0.3f)) == !!signbit (minus_zerof)); ASSERT (!!signbit (roundf (-0.7f)) == !!signbit (minus_zerof)); + /* [MX] shaded specification in POSIX. */ + + /* NaN. */ + ASSERT (isnanf (roundf (NaNf ()))); + /* Infinity. */ + ASSERT (roundf (Infinityf ()) == Infinityf ()); + ASSERT (roundf (- Infinityf ()) == - Infinityf ()); + return 0; }