X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-rint.c;h=c9379c15ce595a4f3f904765ce38ff843c6f1d1c;hb=28df8b1e1d486c3891091a5c08eb0c3311102938;hp=075d05d9a2f4042661f6c0164575bb87aa8e1713;hpb=1602f0afed21be664fcf5c42d59db07cc22c56d6;p=gnulib.git diff --git a/tests/test-rint.c b/tests/test-rint.c index 075d05d9a..c9379c15c 100644 --- a/tests/test-rint.c +++ b/tests/test-rint.c @@ -1,5 +1,5 @@ /* Test of rint() function. - Copyright (C) 2010-2012 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 @@ -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; }