X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-modf.c;h=6ee16c73aac8d6d50ae263955e1cd990eddf6425;hb=38e8c084b95e98c4e763df8cfc43a141aa93fc5f;hp=754a729c4262bc9dba0154d5a25cf8a2d47a7cc3;hpb=05edbffcd49b284a6fbedb15f10e2c67eb4b4f17;p=gnulib.git diff --git a/tests/test-modf.c b/tests/test-modf.c index 754a729c4..6ee16c73a 100644 --- a/tests/test-modf.c +++ b/tests/test-modf.c @@ -1,5 +1,5 @@ /* Test of modf() function. - Copyright (C) 2010 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 @@ -23,11 +23,16 @@ #include "signature.h" SIGNATURE_CHECK (modf, double, (double, double *)); +#include + #include "macros.h" -volatile double x; -double y; -double z; +#define DOUBLE double +#define L_(literal) literal +#define MANT_DIG DBL_MANT_DIG +#define MODF modf +#define RANDOM randomd +#include "test-modf.h" int main () @@ -41,8 +46,10 @@ main () /* A particular negative value. */ x = -5.972406760; y = modf (x, &z); - ASSERT (y >= -0.972406761 && y <= 0.972406759); + ASSERT (y >= -0.972406761 && y <= -0.972406759); ASSERT (z == -5.0); + test_function (); + return 0; }