diff options
author | Bruno Haible <bruno@clisp.org> | 2012-03-03 17:00:59 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-03-03 17:49:18 +0100 |
commit | 80c3530fa6f0b67feb8e3a01c6ae0f3074d8129d (patch) | |
tree | 5deb12d8d3cdf9993fb92331caaf4a094e5ebe81 /tests/test-modf.c | |
parent | ff53c39e3f416e4b8b5dd03e303986edbf20f56c (diff) | |
download | gnulib-80c3530fa6f0b67feb8e3a01c6ae0f3074d8129d.tar.gz |
modf* tests: More tests.
* tests/test-modf.h: New file.
* tests/test-modf.c: Include <float.h> and test-modf.h.
(main): Invoke test_function.
* tests/test-modff.c: Include <float.h> and test-modf.h.
(main): Invoke test_function.
* tests/test-modfl.c: Include <float.h> and test-modf.h.
(main): Invoke test_function.
* modules/modf-tests (Files): Add tests/test-modf.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_modf_SOURCES.
* modules/modff-tests (Files): Add tests/test-modf.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_modff_SOURCES.
* modules/modfl-tests (Files): Add tests/test-modf.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_modfl_SOURCES.
Diffstat (limited to 'tests/test-modf.c')
-rw-r--r-- | tests/test-modf.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/test-modf.c b/tests/test-modf.c index 4f3b630e6a..d1cb14efd4 100644 --- a/tests/test-modf.c +++ b/tests/test-modf.c @@ -23,11 +23,16 @@ #include "signature.h" SIGNATURE_CHECK (modf, double, (double, double *)); +#include <float.h> + #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 () @@ -44,5 +49,7 @@ main () ASSERT (y >= -0.972406761 && y <= -0.972406759); ASSERT (z == -5.0); + test_function (); + return 0; } |