diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-06-26 13:56:26 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-06-26 13:56:26 +0000 |
commit | d18b1abe1133d82b30e2ee43d9f7181209607cfd (patch) | |
tree | 7b438b988d379f2b651995943e13a05d1f63ab89 /tests/tset_si.c | |
parent | a0b09ffccfbcfa83310e3cb5795d99bbc6cc07c2 (diff) | |
download | mpfr-d18b1abe1133d82b30e2ee43d9f7181209607cfd.tar.gz |
[tests/tset_si.c] Also test the mpfr_set_ui function (instead of macro).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8251 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tset_si.c')
-rw-r--r-- | tests/tset_si.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/tset_si.c b/tests/tset_si.c index 7ee4a8fa6..20aba291a 100644 --- a/tests/tset_si.c +++ b/tests/tset_si.c @@ -244,6 +244,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++) { |