X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-rintf.c;h=7bafa2b33fae0c1a923918872841cd06a53ccab8;hb=c9451e3bdc651a742f06b46a450497e59bb5e006;hp=29d77ef3c50222493bb6c33110029410e7716dfd;hpb=6ae9d1c996b859cca28bdd481f52e2ca3da84368;p=gnulib.git diff --git a/tests/test-rintf.c b/tests/test-rintf.c index 29d77ef3c..7bafa2b33 100644 --- a/tests/test-rintf.c +++ b/tests/test-rintf.c @@ -1,5 +1,5 @@ /* Test of rintf() function. - Copyright (C) 2010-2011 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 (rintf, float, (float)); #include "nan.h" #include "macros.h" +#undef INFINITY +#undef NAN + +#define DOUBLE float +#define ISNAN isnanf +#define INFINITY Infinityf () +#define NAN NaNf () +#define L_(literal) literal##f +#define RINT rintf +#define RANDOM randomf +#include "test-rint.h" + int main () { @@ -75,11 +87,8 @@ main () ASSERT (rintf (-65536.0f) == -65536.0f); ASSERT (rintf (-65536.01f) == -65536.0f); ASSERT (rintf (-2.341e31f) == -2.341e31f); - /* Infinite numbers. */ - ASSERT (rintf (Infinityf ()) == Infinityf ()); - ASSERT (rintf (- Infinityf ()) == - Infinityf ()); - /* NaNs. */ - ASSERT (isnanf (rintf (NaNf ()))); + + test_function (); return 0; }