X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-floorf1.c;h=785549d87a22c9effe8462fbd902dd67737e22d5;hb=HEAD;hp=4877c419f20e276709349f4cc03b0cf36f2cde8c;hpb=04da1cb11cf8285b944492aaa636dbd596ed5e74;p=gnulib.git diff --git a/tests/test-floorf1.c b/tests/test-floorf1.c index 4877c419f..785549d87 100644 --- a/tests/test-floorf1.c +++ b/tests/test-floorf1.c @@ -1,5 +1,5 @@ /* Test of rounding towards negative infinity. - Copyright (C) 2007-2010 Free Software Foundation, Inc. + Copyright (C) 2007-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 @@ -25,6 +25,7 @@ SIGNATURE_CHECK (floorf, float, (float)); #include "isnanf-nolibm.h" #include "minus-zero.h" +#include "infinity.h" #include "nan.h" #include "macros.h" @@ -46,9 +47,7 @@ main (int argc, char **argv _GL_UNUSED) /* Zero. */ ASSERT (my_floorf (0.0f) == 0.0f); - ASSERT (!signbit (my_floorf (0.0f))); ASSERT (my_floorf (minus_zerof) == 0.0f); - ASSERT (!!signbit (minus_zerof) == !!signbit (my_floorf (minus_zerof))); /* Positive numbers. */ ASSERT (my_floorf (0.3f) == 0.0f); ASSERT (my_floorf (0.7f) == 0.0f); @@ -71,8 +70,8 @@ main (int argc, char **argv _GL_UNUSED) ASSERT (my_floorf (-65536.0f) == -65536.0f); ASSERT (my_floorf (-2.341e31f) == -2.341e31f); /* Infinite numbers. */ - ASSERT (my_floorf (1.0f / 0.0f) == 1.0f / 0.0f); - ASSERT (my_floorf (-1.0f / 0.0f) == -1.0f / 0.0f); + ASSERT (my_floorf (Infinityf ()) == Infinityf ()); + ASSERT (my_floorf (- Infinityf ()) == - Infinityf ()); /* NaNs. */ ASSERT (isnanf (my_floorf (NaNf ())));