diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-29 17:22:30 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-02-29 17:22:30 +0000 |
commit | f195d7e1d80c77d394ff34bfdfdada65f3deea4c (patch) | |
tree | b720a8ab8623fb853baa83cdae5f34b1cb5dc32d /tests | |
parent | 73edb59192a251b9283d34358f6bab006b5bf181 (diff) | |
download | mpfr-f195d7e1d80c77d394ff34bfdfdada65f3deea4c.tar.gz |
fixed assert macros
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@10143 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tget_set_d64.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/tget_set_d64.c b/tests/tget_set_d64.c index fbd2d0b43..117ce3fc5 100644 --- a/tests/tget_set_d64.c +++ b/tests/tget_set_d64.c @@ -66,63 +66,63 @@ check_inf_nan (void) d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 1, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_nan_p (x)); + MPFR_ASSERTN (mpfr_nan_p (x)); mpfr_set_inf (x, 1); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 1, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_inf_p (x) && mpfr_sgn (x) > 0); + MPFR_ASSERTN (mpfr_inf_p (x) && mpfr_sgn (x) > 0); mpfr_set_inf (x, -1); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 1, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_inf_p (x) && mpfr_sgn (x) < 0); + MPFR_ASSERTN (mpfr_inf_p (x) && mpfr_sgn (x) < 0); mpfr_set_ui (x, 0, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 1, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp_ui (x, 0) == 0 && MPFR_SIGN (x) > 0); + MPFR_ASSERTN (mpfr_cmp_ui (x, 0) == 0 && MPFR_SIGN (x) > 0); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_neg (x, x, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 1, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp_ui (x, 0) == 0 && MPFR_SIGN (x) < 0); + MPFR_ASSERTN (mpfr_cmp_ui (x, 0) == 0 && MPFR_SIGN (x) < 0); mpfr_set_ui (x, 1, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp_ui (x, 1) == 0); + MPFR_ASSERTN (mpfr_cmp_ui (x, 1) == 0); mpfr_set_si (x, -1, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp_si (x, -1) == 0); + MPFR_ASSERTN (mpfr_cmp_si (x, -1) == 0); mpfr_set_ui (x, 2, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp_ui (x, 2) == 0); + MPFR_ASSERTN (mpfr_cmp_ui (x, 2) == 0); mpfr_set_ui (x, 99, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp_ui (x, 99) == 0); + MPFR_ASSERTN (mpfr_cmp_ui (x, 99) == 0); mpfr_set_str (x, "9999999999999999", 10, MPFR_RNDZ); mpfr_set (y, x, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp (x, y) == 0); + MPFR_ASSERTN (mpfr_cmp (x, y) == 0); /* smallest normal number */ mpfr_set_str (x, "1E-383", 10, MPFR_RNDU); @@ -130,7 +130,7 @@ check_inf_nan (void) d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDU); - ASSERT_ALWAYS (mpfr_cmp (x, y) == 0); + MPFR_ASSERTN (mpfr_cmp (x, y) == 0); /* smallest subnormal number */ mpfr_set_str (x, "1E-398", 10, MPFR_RNDU); @@ -138,7 +138,7 @@ check_inf_nan (void) d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDU); - ASSERT_ALWAYS (mpfr_cmp (x, y) == 0); + MPFR_ASSERTN (mpfr_cmp (x, y) == 0); /* subnormal number with exponent change when we round back from 16 digits to 1 digit */ @@ -147,24 +147,24 @@ check_inf_nan (void) mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDD); mpfr_set_str (y, "1E-397", 10, MPFR_RNDN); - ASSERT_ALWAYS (mpfr_cmp (x, y) == 0); + MPFR_ASSERTN (mpfr_cmp (x, y) == 0); /* largest number */ mpfr_set_str (x, "9.999999999999999E384", 10, MPFR_RNDZ); mpfr_set (y, x, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDU); - ASSERT_ALWAYS (d == DEC64_MAX); + MPFR_ASSERTN (d == DEC64_MAX); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp (x, y) == 0); + MPFR_ASSERTN (mpfr_cmp (x, y) == 0); mpfr_set_str (x, "-9.999999999999999E384", 10, MPFR_RNDZ); mpfr_set (y, x, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDA); - ASSERT_ALWAYS (d == -DEC64_MAX); + MPFR_ASSERTN (d == -DEC64_MAX); mpfr_set_ui (x, 0, MPFR_RNDZ); mpfr_set_decimal64 (x, d, MPFR_RNDZ); - ASSERT_ALWAYS (mpfr_cmp (x, y) == 0); + MPFR_ASSERTN (mpfr_cmp (x, y) == 0); mpfr_set_prec (x, 53); mpfr_set_prec (y, 53); @@ -173,7 +173,7 @@ check_inf_nan (void) mpfr_set_str (x, "9.999999999999999E384", 10, MPFR_RNDZ); d = mpfr_get_decimal64 (x, MPFR_RNDZ); mpfr_set_decimal64 (y, d, MPFR_RNDU); - ASSERT_ALWAYS (mpfr_cmp (x, y) == 0); + MPFR_ASSERTN (mpfr_cmp (x, y) == 0); mpfr_clear (x); mpfr_clear (y); |