summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/texceptions.c5
-rw-r--r--tests/tset_exp.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/texceptions.c b/tests/texceptions.c
index 94a15bef4..48f4bbe0f 100644
--- a/tests/texceptions.c
+++ b/tests/texceptions.c
@@ -103,10 +103,13 @@ static void
check_get_prec (void)
{
mpfr_t x;
+ int i = 0;
mpfr_init2 (x, 17);
- if (mpfr_get_prec (x) != 17 || (mpfr_get_prec)(x) != 17)
+ if (mpfr_get_prec (x) != 17 || (mpfr_get_prec) (x) != 17 ||
+ mpfr_get_prec ((i++, (void *) x)) != 17)
PRINT_ERROR ("mpfr_get_prec");
+ MPFR_ASSERTN (i == 1);
mpfr_clear (x);
}
diff --git a/tests/tset_exp.c b/tests/tset_exp.c
index 15aba16cb..7eeb4eb0b 100644
--- a/tests/tset_exp.c
+++ b/tests/tset_exp.c
@@ -28,6 +28,7 @@ main (int argc, char *argv[])
mpfr_t x;
int ret;
mpfr_exp_t emin, emax, e;
+ int i = 0;
tests_start_mpfr ();
@@ -62,6 +63,9 @@ main (int argc, char *argv[])
MPFR_ASSERTN (e == emin);
e = (mpfr_get_exp) (x);
MPFR_ASSERTN (e == emin);
+ e = mpfr_get_exp ((i++, (void *) x));
+ MPFR_ASSERTN (e == emin);
+ MPFR_ASSERTN (i == 1);
ret = mpfr_set_exp (x, -1);
MPFR_ASSERTN (ret == 0 && mpfr_cmp_ui_2exp (x, 1, -2) == 0);