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