summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2012-06-26 13:57:32 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2012-06-26 13:57:32 +0000
commitdb2e70d6db459129e4bad1d45625eaa4bbc4bf8a (patch)
treed4de6b3c8087f42c3aafff1ead7597507d601b9b
parent977ecfd51dd2d7e195529959f1bdc5cd1f0f20fd (diff)
downloadmpfr-db2e70d6db459129e4bad1d45625eaa4bbc4bf8a.tar.gz
[tests/tset_si.c] Also test the mpfr_set_ui function (instead of macro).
(merged changeset r8251 from the trunk) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@8252 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tset_si.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/tset_si.c b/tests/tset_si.c
index 52d9f4d84..f1e40b9b3 100644
--- a/tests/tset_si.c
+++ b/tests/tset_si.c
@@ -248,6 +248,14 @@ main (int argc, char *argv[])
mpfr_get_si (x, MPFR_RNDZ), inex);
exit (1);
}
+ /* Also test the mpfr_set_ui function (instead of macro). */
+ inex = (mpfr_set_ui) (x, 33096, MPFR_RNDU);
+ if (mpfr_get_si (x, MPFR_RNDZ) != 49152)
+ {
+ printf ("Error in mpfr_set_ui function, exp. 49152, got %ld, inex %d\n",
+ mpfr_get_si (x, MPFR_RNDZ), inex);
+ exit (1);
+ }
for (r = 0 ; r < MPFR_RND_MAX ; r++)
{