X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-truncf2.c;h=dd849ab20b3b484f4133773116e603a1b62d08e4;hb=757fcfd1ef1892f1472c0712acdf8a2d4ec774da;hp=c511cb1ebf85ce44045c8facc0731d37e1123d82;hpb=3db9b0d802e34ec28fc924076ae4c196bd7d23a9;p=gnulib.git diff --git a/tests/test-truncf2.c b/tests/test-truncf2.c index c511cb1eb..dd849ab20 100644 --- a/tests/test-truncf2.c +++ b/tests/test-truncf2.c @@ -1,5 +1,5 @@ /* Test of rounding towards zero. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 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 @@ -26,7 +26,7 @@ #include #include -#include "isnanf.h" +#include "isnanf-nolibm.h" #define ASSERT(expr) \ do \ @@ -34,6 +34,7 @@ if (!(expr)) \ { \ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + fflush (stderr); \ abort (); \ } \ } \ @@ -113,10 +114,10 @@ correct_result_p (DOUBLE x, DOUBLE result) return (x >= 0 ? (x < 1 ? result == L_(0.0) : - x - 1 < x ? result <= x && result > x - 1 : + x - 1 < x ? result <= x && result >= x - 1 && x - result < 1 : equal (result, x)) : (x > -1 ? result == L_(0.0) : - x + 1 > x ? result >= x && result < x + 1 : + x + 1 > x ? result >= x && result <= x + 1 && result - x < 1 : equal (result, x))); }