diff options
author | Bruno Haible <bruno@clisp.org> | 2012-03-03 18:15:16 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2012-03-03 19:56:25 +0100 |
commit | 3261e6f0337130c6bbde8db61e28c87bb901d749 (patch) | |
tree | 070707e93fb9d4703fbd9e914bc88b638407fe12 /tests/test-fmod.c | |
parent | e342ff35944348fd2c2c8d154c639defb6268694 (diff) | |
download | gnulib-3261e6f0337130c6bbde8db61e28c87bb901d749.tar.gz |
fmod* tests: More tests.
* tests/test-fmod.h: New file.
* tests/test-fmod.c: Include <float.h> and test-fmod.h.
(main): Invoke test_function.
* tests/test-fmodf.c: Include <float.h> and test-fmod.h.
(main): Invoke test_function.
* tests/test-fmodl.c: Include <float.h> and test-fmod.h.
(main): Invoke test_function.
* modules/fmod-tests (Files): Add tests/test-fmod.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_fmod_SOURCES.
* modules/fmodf-tests (Files): Add tests/test-fmod.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_fmodf_SOURCES.
* modules/fmodl-tests (Files): Add tests/test-fmod.h, tests/randoml.c.
(Depends-on): Add 'float'.
(Makefile.am): Add randoml.c to test_fmodl_SOURCES.
Diffstat (limited to 'tests/test-fmod.c')
-rw-r--r-- | tests/test-fmod.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/test-fmod.c b/tests/test-fmod.c index 74ee969d8d..27a23e3026 100644 --- a/tests/test-fmod.c +++ b/tests/test-fmod.c @@ -23,11 +23,16 @@ #include "signature.h" SIGNATURE_CHECK (fmod, double, (double, double)); +#include <float.h> + #include "macros.h" -volatile double x; -volatile double y; -double z; +#define DOUBLE double +#define L_(literal) literal +#define MANT_DIG DBL_MANT_DIG +#define FMOD fmod +#define RANDOM randomd +#include "test-fmod.h" int main () @@ -38,5 +43,7 @@ main () z = fmod (x, y); ASSERT (z >= 2.962721817 && z <= 2.962721819); + test_function (); + return 0; } |