diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-11-19 12:39:10 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2004-11-19 12:39:10 +0000 |
commit | 38c77249c6671159c0c7e40a73f1f5a3bc76dc8e (patch) | |
tree | fd12f35cf4b230dfcccf5eaf65a216f3ba0cdca7 /tests/tcmp_ui.c | |
parent | 68d7536264604dfa93c6540d11fd292e6e14e3ff (diff) | |
download | mpfr-38c77249c6671159c0c7e40a73f1f5a3bc76dc8e.tar.gz |
Improve coverage tests.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3107 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tcmp_ui.c')
-rw-r--r-- | tests/tcmp_ui.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/tcmp_ui.c b/tests/tcmp_ui.c index 819bf4649..197a2ac57 100644 --- a/tests/tcmp_ui.c +++ b/tests/tcmp_ui.c @@ -38,7 +38,7 @@ main (void) /* tests for cmp_ui */ mpfr_set_ui (x, 3, GMP_RNDZ); - if (mpfr_cmp_ui (x, i = 3) != 0) + if ((mpfr_cmp_ui) (x, i = 3) != 0) { printf ("Error in mpfr_cmp_ui(3.0, 3)\n"); exit (1); @@ -60,6 +60,12 @@ main (void) printf ("Error in mpfr_cmp_ui(0.0,0)\n"); exit (1); } + mpfr_set_ui (x, 1, GMP_RNDZ); + if (mpfr_cmp_ui (x, i = 0) == 0) + { + printf ("Error in mpfr_cmp_ui(1.0,0)\n"); + exit (1); + } mpfr_set_ui (x, 0, GMP_RNDN); mpfr_ui_div (x, 1, x, GMP_RNDU); |