[Gmp-commit] /var/hg/gmp: mini-gmp/tests/t-signed.c: compare also after overflow

mercurial at gmplib.org mercurial at gmplib.org
Mon Nov 21 22:19:26 UTC 2016


details:   /var/hg/gmp/rev/0d731d3a79de
changeset: 17124:0d731d3a79de
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Nov 21 23:19:24 2016 +0100
description:
mini-gmp/tests/t-signed.c: compare also after overflow

diffstat:

 mini-gmp/tests/t-signed.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r b5fbe0eed558 -r 0d731d3a79de mini-gmp/tests/t-signed.c
--- a/mini-gmp/tests/t-signed.c	Mon Nov 21 22:41:57 2016 +0100
+++ b/mini-gmp/tests/t-signed.c	Mon Nov 21 23:19:24 2016 +0100
@@ -76,6 +76,14 @@
 	  goto fail;
 	}
     }
+  else
+    {
+      if (mpz_cmp_si (sz, si) != c)
+	{
+	  printf ("mpz_cmp_si (sz, %ld) != %i.\n", si, c);
+	  goto fail;
+	}
+    }
   if (mpz_fits_slong_p (oz)) 
     {
       if (!check_si (oz, oi))


More information about the gmp-commit mailing list