X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-floor-ieee.c;h=33e55089e87e2640835d6a366fae21eac2ba7a92;hb=4779b635ef35c7b0bc4044fcb5bc746d06f158c4;hp=4446e8b1488f853a8df593361a5d1911d2fc4fa0;hpb=9ca8092d849ed03418229af9a2aefdf784fd4db9;p=gnulib.git diff --git a/tests/test-floor-ieee.c b/tests/test-floor-ieee.c index 4446e8b14..33e55089e 100644 --- a/tests/test-floor-ieee.c +++ b/tests/test-floor-ieee.c @@ -1,5 +1,5 @@ /* Test of rounding towards negative infinity. - Copyright (C) 2010 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 "isnand-nolibm.h" #include "minus-zero.h" +#include "infinity.h" +#include "nan.h" #include "macros.h" int @@ -39,5 +42,13 @@ main () ASSERT (!!signbit (floor (-0.3)) == !!signbit (minus_zerod)); ASSERT (!!signbit (floor (-0.7)) == !!signbit (minus_zerod)); + /* [MX] shaded specification in POSIX. */ + + /* NaN. */ + ASSERT (isnand (floor (NaNd ()))); + /* Infinity. */ + ASSERT (floor (Infinityd ()) == Infinityd ()); + ASSERT (floor (- Infinityd ()) == - Infinityd ()); + return 0; }