summaryrefslogtreecommitdiff
path: root/tests/test-sqrtl.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2012-03-05 02:14:30 +0100
committerBruno Haible <bruno@clisp.org>2012-03-05 02:14:53 +0100
commitc5bc2aeaf6f4ca2d1e25f58b78a655f6211b50a6 (patch)
treec28ae6de2b2c6887ce6cf78adc8defd3bfe7cc3a /tests/test-sqrtl.c
parent5eb8c1aaacc36b33fce63f8e9f15175997bb1fa4 (diff)
downloadgnulib-c5bc2aeaf6f4ca2d1e25f58b78a655f6211b50a6.tar.gz
sqrt* tests: More tests.
* tests/test-sqrt.h: New file. * tests/test-sqrt.c: Include <float.h> and test-sqrt.h. (main): Invoke test_function. * tests/test-sqrtf.c: Include <float.h> and test-sqrt.h. (main): Invoke test_function. * tests/test-sqrtl.c: Include <float.h> and test-sqrt.h. (main): Invoke test_function. * modules/sqrt-tests (Files): Add tests/test-sqrt.h, tests/randomd.c. (Makefile.am): Add randomd.c to test_sqrt_SOURCES. * modules/sqrtf-tests (Files): Add tests/test-sqrt.h, tests/randomf.c. (Makefile.am): Add randomf.c to test_sqrtf_SOURCES. * modules/sqrtl-tests (Files): Add tests/test-sqrt.h, tests/randoml.c. (Depends-on): Add 'float'. (Makefile.am): Add randoml.c to test_sqrtl_SOURCES.
Diffstat (limited to 'tests/test-sqrtl.c')
-rw-r--r--tests/test-sqrtl.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/test-sqrtl.c b/tests/test-sqrtl.c
index fa2889cb99..23dcfe43ae 100644
--- a/tests/test-sqrtl.c
+++ b/tests/test-sqrtl.c
@@ -23,11 +23,17 @@
#include "signature.h"
SIGNATURE_CHECK (sqrtl, long double, (long double));
+#include <float.h>
+
#include "fpucw.h"
#include "macros.h"
-volatile long double x;
-long double y;
+#define DOUBLE long double
+#define L_(literal) literal##L
+#define MANT_DIG DBL_MANT_DIG
+#define SQRT sqrtl
+#define RANDOM randoml
+#include "test-sqrt.h"
int
main ()
@@ -41,5 +47,7 @@ main ()
y = sqrtl (x);
ASSERT (y >= 0.7745966692L && y <= 0.7745966693L);
+ test_function ();
+
return 0;
}