summaryrefslogtreecommitdiff
path: root/tests/test-remainder.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-03-04 23:07:45 +0100
committerBruno Haible <bruno@clisp.org>2012-03-04 23:07:45 +0100
commit5eb8c1aaacc36b33fce63f8e9f15175997bb1fa4 (patch)
tree975fa46ba9a97f9351d22c724290dde4fecdb06d /tests/test-remainder.c
parent9655379852fdbf3a0797035fc30a4060a2b191cf (diff)
downloadgnulib-5eb8c1aaacc36b33fce63f8e9f15175997bb1fa4.tar.gz
remainder* tests: More tests.
* tests/test-remainder.h: New file, based on tests/test-fmod.h. * tests/test-remainder.c: Include <float.h> and test-remainder.h. (main): Invoke test_function. * tests/test-remainderf.c: Include <float.h> and test-remainder.h. (main): Invoke test_function. * tests/test-remainderl.c: Include <float.h> and test-remainder.h. (main): Invoke test_function. * modules/remainder-tests (Files): Add tests/test-remainder.h, tests/randomd.c. (Makefile.am): Add randomd.c to test_remainder_SOURCES. * modules/remainderf-tests (Files): Add tests/test-remainder.h, tests/randomf.c. (Makefile.am): Add randomf.c to test_remainderf_SOURCES. * modules/remainderl-tests (Files): Add tests/test-remainder.h, tests/randoml.c. (Depends-on): Add 'float'. (Makefile.am): Add randoml.c to test_remainderl_SOURCES.
Diffstat (limited to 'tests/test-remainder.c')
-rw-r--r--tests/test-remainder.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/test-remainder.c b/tests/test-remainder.c
index 5869bb7d73..c43d60639f 100644
--- a/tests/test-remainder.c
+++ b/tests/test-remainder.c
@@ -23,11 +23,17 @@
#include "signature.h"
SIGNATURE_CHECK (remainder, 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 MAX_EXP DBL_MAX_EXP
+#define REMAINDER remainder
+#define RANDOM randomd
+#include "test-remainder.h"
int
main ()
@@ -38,5 +44,7 @@ main ()
z = remainder (x, y);
ASSERT (z >= -0.178870837 && z <= -0.178870835);
+ test_function ();
+
return 0;
}