diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-01-01 03:17:56 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-01-01 03:17:56 +0000 |
commit | 1343504c832f1365d4c67fa55400528b07596396 (patch) | |
tree | f9e599d37cdadd3fd4159e03f9f9e4b5d36ca309 /tests | |
parent | d33c60c935a20bdfe8a0765c512a903ddeefbb8d (diff) | |
download | mpfr-1343504c832f1365d4c67fa55400528b07596396.tar.gz |
tgeneric.c: in the bug detection with flags set before the function
call, the erange flag was set, so that no checks were performed on
the return value. Fixed that by not setting the erange flag.
-> Now, 7 tests fail!
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5150 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tgeneric.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/tgeneric.c b/tests/tgeneric.c index 43f366bbd..202888c32 100644 --- a/tests/tgeneric.c +++ b/tests/tgeneric.c @@ -242,9 +242,12 @@ test_generic (mp_prec_t p0, mp_prec_t p1, unsigned int N) ctrn++; mpfr_set (t, y, rnd); /* Risk of failures are known when some flags are already set - before the function call. */ + before the function call. Do not set the erange flag, as + it will remain set after the function call and no checks + are performed in such a case (see the mpfr_erangeflag_p + test below). */ if (randlimb () & 1) - __gmpfr_flags = MPFR_FLAGS_ALL; + __gmpfr_flags = MPFR_FLAGS_ALL ^ MPFR_FLAGS_ERANGE; #ifdef DEBUG_TGENERIC TGENERIC_INFO (TEST_FUNCTION, MPFR_PREC (z)); #endif |