summaryrefslogtreecommitdiff
path: root/tests/texceptions.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-01-14 11:10:43 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2011-01-14 11:10:43 +0000
commit807b1ab371020fa8dd2f348b104a635065f1e30e (patch)
tree90889b8944c1663e6227a09a21926baf57d98f8c /tests/texceptions.c
parent1910cd67b91113c8834bc5ecb08782ca20d6c3b7 (diff)
downloadmpfr-807b1ab371020fa8dd2f348b104a635065f1e30e.tar.gz
Improved tests/texceptions.c (mpfr_clear_*, mpfr_set_*).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7345 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/texceptions.c')
-rw-r--r--tests/texceptions.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/tests/texceptions.c b/tests/texceptions.c
index 2018b5038..8240ea475 100644
--- a/tests/texceptions.c
+++ b/tests/texceptions.c
@@ -291,7 +291,52 @@ check_set (void)
mpfr_set_erangeflag ();
MPFR_ASSERTN ((mpfr_erangeflag_p) ());
- mpfr_clear_flags ();
+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_ALL);
+
+ mpfr_clear_overflow ();
+ MPFR_ASSERTN (! (mpfr_overflow_p) ());
+ mpfr_clear_underflow ();
+ MPFR_ASSERTN (! (mpfr_underflow_p) ());
+ mpfr_clear_divby0 ();
+ MPFR_ASSERTN (! (mpfr_divby0_p) ());
+ mpfr_clear_nanflag ();
+ MPFR_ASSERTN (! (mpfr_nanflag_p) ());
+ mpfr_clear_inexflag ();
+ MPFR_ASSERTN (! (mpfr_inexflag_p) ());
+ mpfr_clear_erangeflag ();
+ MPFR_ASSERTN (! (mpfr_erangeflag_p) ());
+
+ MPFR_ASSERTN (__gmpfr_flags == 0);
+
+ (mpfr_set_overflow) ();
+ MPFR_ASSERTN (mpfr_overflow_p ());
+ (mpfr_set_underflow) ();
+ MPFR_ASSERTN (mpfr_underflow_p ());
+ (mpfr_set_divby0) ();
+ MPFR_ASSERTN (mpfr_divby0_p ());
+ (mpfr_set_nanflag) ();
+ MPFR_ASSERTN (mpfr_nanflag_p ());
+ (mpfr_set_inexflag) ();
+ MPFR_ASSERTN (mpfr_inexflag_p ());
+ (mpfr_set_erangeflag) ();
+ MPFR_ASSERTN (mpfr_erangeflag_p ());
+
+ MPFR_ASSERTN (__gmpfr_flags == MPFR_FLAGS_ALL);
+
+ (mpfr_clear_overflow) ();
+ MPFR_ASSERTN (! mpfr_overflow_p ());
+ (mpfr_clear_underflow) ();
+ MPFR_ASSERTN (! mpfr_underflow_p ());
+ (mpfr_clear_divby0) ();
+ MPFR_ASSERTN (! mpfr_divby0_p ());
+ (mpfr_clear_nanflag) ();
+ MPFR_ASSERTN (! mpfr_nanflag_p ());
+ (mpfr_clear_inexflag) ();
+ MPFR_ASSERTN (! mpfr_inexflag_p ());
+ (mpfr_clear_erangeflag) ();
+ MPFR_ASSERTN (! mpfr_erangeflag_p ());
+
+ MPFR_ASSERTN (__gmpfr_flags == 0);
}
int