summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-08-27 20:36:53 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-08-27 20:36:53 +0000
commitdab2aeae013743b6d9d994e6a132c222c0b5ff8a (patch)
treea51d1726f68da503227db64f44b6c4d8b5692abb
parent6a8aa5732a7a2c67c95d30b19ac848451401681b (diff)
downloadmpfr-dab2aeae013743b6d9d994e6a132c222c0b5ff8a.tar.gz
[tests/turandom.c] Disabled a test with GMP < 4.2.0 since it depends on
a specific behavior of the random generator, which changed in GMP 4.2.0 (the test would probably fail with such old GMP versions). (applied a part of r8787 and merged changeset r11651 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@11665 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/turandom.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/turandom.c b/tests/turandom.c
index bedd98ca4..4b8746abc 100644
--- a/tests/turandom.c
+++ b/tests/turandom.c
@@ -181,7 +181,9 @@ test_urandom (long nbtests, mpfr_prec_t prec, mpfr_rnd_t rnd, long bit_index,
return;
}
-/* problem reported by Carl Witty */
+/* Problem reported by Carl Witty. This test assumes the random generator
+ used by GMP is deterministic (for a given seed). We need to distinguish
+ two cases since the random generator changed in GMP 4.2.0. */
static void
bug20100914 (void)
{
@@ -224,6 +226,7 @@ bug20100914 (void)
static void
bug20170123 (void)
{
+#if __MPFR_GMP(4,2,0)
mpfr_t x;
mpfr_exp_t emin;
@@ -235,6 +238,7 @@ bug20170123 (void)
MPFR_ASSERTN(mpfr_cmp_ui_2exp (x, 1, -8) == 0);
mpfr_clear (x);
mpfr_set_emin (emin);
+#endif
}
static void