summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/reuse.c8
-rw-r--r--tests/tadd_d.c13
-rw-r--r--tests/td_div.c13
-rw-r--r--tests/td_sub.c13
-rw-r--r--tests/tdiv_d.c13
-rw-r--r--tests/tfmod.c13
-rw-r--r--tests/tli2.c13
-rw-r--r--tests/tmodf.c13
-rw-r--r--tests/tmul_d.c13
-rw-r--r--tests/tprintf.c15
-rw-r--r--tests/tsinh_cosh.c13
-rw-r--r--tests/tsub_d.c13
12 files changed, 152 insertions, 1 deletions
diff --git a/tests/reuse.c b/tests/reuse.c
index 37b3e5ce0..31179d2ec 100644
--- a/tests/reuse.c
+++ b/tests/reuse.c
@@ -591,7 +591,9 @@ main (void)
test2 (mpfr_erfc, "mpfr_erfc", p, rnd);
test2 (mpfr_j0, "mpfr_j0", p, rnd);
test2 (mpfr_j1, "mpfr_j1", p, rnd);
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
test2 (mpfr_li2, "mpfr_li2", p, rnd);
+#endif
test2 (mpfr_zeta, "mpfr_zeta", p, rnd);
test2 (mpfr_gamma, "mpfr_gamma", p, rnd);
@@ -599,15 +601,21 @@ main (void)
test2 (mpfr_frac, "mpfr_frac", p, rnd);
test3 (mpfr_remainder, "mpfr_remainder", p, rnd);
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
test3 (mpfr_fmod, "mpfr_fmod", p, rnd);
+#endif
test3 (mpfr_pow, "mpfr_pow", p, rnd);
test3 (mpfr_atan2, "mpfr_atan2", p, rnd);
test4 (mpfr_fma, "mpfr_fma", p, rnd);
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
test3a (mpfr_modf, "mpfr_modf", p, rnd);
+#endif
test3a (mpfr_sin_cos, "mpfr_sin_cos", p, rnd);
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
test3a (mpfr_sinh_cosh, "mpfr_sinh_cosh", p, rnd);
+#endif
}
tests_end_mpfr ();
diff --git a/tests/tadd_d.c b/tests/tadd_d.c
index 05ae15b47..e99b3bf38 100644
--- a/tests/tadd_d.c
+++ b/tests/tadd_d.c
@@ -26,6 +26,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
static void
check_regulars (void)
{
@@ -134,3 +136,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif
diff --git a/tests/td_div.c b/tests/td_div.c
index 74c3ee72b..29e52486e 100644
--- a/tests/td_div.c
+++ b/tests/td_div.c
@@ -26,6 +26,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
static void
check_nans (void)
{
@@ -110,3 +112,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif
diff --git a/tests/td_sub.c b/tests/td_sub.c
index 836e920fd..425a32073 100644
--- a/tests/td_sub.c
+++ b/tests/td_sub.c
@@ -26,6 +26,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
static void
check_nans (void)
{
@@ -104,3 +106,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif
diff --git a/tests/tdiv_d.c b/tests/tdiv_d.c
index 3f3da8e2e..770768cef 100644
--- a/tests/tdiv_d.c
+++ b/tests/tdiv_d.c
@@ -26,6 +26,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
static void
check_nans (void)
{
@@ -109,3 +111,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif
diff --git a/tests/tfmod.c b/tests/tfmod.c
index a01ca79c4..f5ddab057 100644
--- a/tests/tfmod.c
+++ b/tests/tfmod.c
@@ -25,6 +25,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
#define TEST_FUNCTION mpfr_fmod
#define TWO_ARGS
#include "tgeneric.c"
@@ -198,3 +200,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif
diff --git a/tests/tli2.c b/tests/tli2.c
index 4a642b169..2e8b04ac2 100644
--- a/tests/tli2.c
+++ b/tests/tli2.c
@@ -23,6 +23,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
#define TEST_FUNCTION mpfr_li2
#include "tgeneric.c"
@@ -126,3 +128,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif
diff --git a/tests/tmodf.c b/tests/tmodf.c
index 533b88f32..6f9901ff1 100644
--- a/tests/tmodf.c
+++ b/tests/tmodf.c
@@ -25,6 +25,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
static void
check (const char *xis, const char *xfs, const char *xs,
mp_prec_t xip, mp_prec_t xfp, mp_prec_t xp,
@@ -122,3 +124,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif
diff --git a/tests/tmul_d.c b/tests/tmul_d.c
index ff32c3407..06c8bc2ec 100644
--- a/tests/tmul_d.c
+++ b/tests/tmul_d.c
@@ -26,6 +26,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
static void
check_nans (void)
{
@@ -108,3 +110,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif
diff --git a/tests/tprintf.c b/tests/tprintf.c
index d845fd710..01955dcbd 100644
--- a/tests/tprintf.c
+++ b/tests/tprintf.c
@@ -34,6 +34,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
const int buf_size = 1024;
const char pinf_str[] = "inf";
const char pinf_uc_str[] = "INF";
@@ -389,10 +391,21 @@ main (int argc, char **argv)
return 0;
}
+#else /* MPFR_VERSION */
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif /* MPFR_VERSION */
+
#else /* HAVE_STDARG */
int
-main (int argc, char **argv)
+main (void)
{
/* We have nothing to test. */
return 0;
diff --git a/tests/tsinh_cosh.c b/tests/tsinh_cosh.c
index ead3e5985..e87d875d3 100644
--- a/tests/tsinh_cosh.c
+++ b/tests/tsinh_cosh.c
@@ -25,6 +25,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
static void
failed (mpfr_t x, mpfr_t esh, mpfr_t gsh, mpfr_t ech, mpfr_t gch)
{
@@ -128,3 +130,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif
diff --git a/tests/tsub_d.c b/tests/tsub_d.c
index 98253b5e7..a0e13d0a3 100644
--- a/tests/tsub_d.c
+++ b/tests/tsub_d.c
@@ -26,6 +26,8 @@ MA 02110-1301, USA. */
#include "mpfr-test.h"
+#if MPFR_VERSION >= MPFR_VERSION_NUM(2,4,0)
+
static void
check_nans (void)
{
@@ -103,3 +105,14 @@ main (int argc, char *argv[])
tests_end_mpfr ();
return 0;
}
+
+#else
+
+int
+main (void)
+{
+ printf ("Warning! Test disabled for this MPFR version.\n");
+ return 0;
+}
+
+#endif