X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=tests%2Ftest-rint.c;h=ce0b534698ad0bc05988d1f792f5cd8e57591264;hb=bfe5b0dfd062fb9ffbc61b27a0d750c41abc1a8e;hp=0a8a0107d30efa321c193ad09610830e89c26a03;hpb=170dd03f1170f0760c2b95f0f2ee18ed64b10c1c;p=gnulib.git diff --git a/tests/test-rint.c b/tests/test-rint.c index 0a8a0107d..ce0b53469 100644 --- a/tests/test-rint.c +++ b/tests/test-rint.c @@ -1,5 +1,5 @@ /* Test of rint() function. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-2012 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 @@ -32,6 +32,18 @@ SIGNATURE_CHECK (rint, double, (double)); #include "nan.h" #include "macros.h" +#undef INFINITY +#undef NAN + +#define DOUBLE double +#define ISNAN isnand +#define INFINITY Infinityd () +#define NAN NaNd () +#define L_(literal) literal +#define RINT rint +#define RANDOM randomd +#include "test-rint.h" + int main () { @@ -75,11 +87,8 @@ main () ASSERT (rint (-65536.0) == -65536.0); ASSERT (rint (-65536.001) == -65536.0); ASSERT (rint (-2.341e31) == -2.341e31); - /* Infinite numbers. */ - ASSERT (rint (Infinityd ()) == Infinityd ()); - ASSERT (rint (- Infinityd ()) == - Infinityd ()); - /* NaNs. */ - ASSERT (isnand (rint (NaNd ()))); + + test_function (); return 0; }