[Gmp-commit] /var/hg/gmp: mini-gmp/tests/t-signed.c: compare differently sign...

mercurial at gmplib.org mercurial at gmplib.org
Mon Nov 21 22:47:44 UTC 2016


details:   /var/hg/gmp/rev/7883c06b88f0
changeset: 17125:7883c06b88f0
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Nov 21 23:47:36 2016 +0100
description:
mini-gmp/tests/t-signed.c: compare differently signed operands

diffstat:

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

diffs (15 lines):

diff -r 0d731d3a79de -r 7883c06b88f0 mini-gmp/tests/t-signed.c
--- a/mini-gmp/tests/t-signed.c	Mon Nov 21 23:19:24 2016 +0100
+++ b/mini-gmp/tests/t-signed.c	Mon Nov 21 23:47:36 2016 +0100
@@ -83,6 +83,11 @@
 	  printf ("mpz_cmp_si (sz, %ld) != %i.\n", si, c);
 	  goto fail;
 	}
+      if (mpz_cmp_si (sz, -c) != c)
+	{
+	  printf ("mpz_cmp_si (sz, %ld) != %i.\n", -c, c);
+	  goto fail;
+	}
     }
   if (mpz_fits_slong_p (oz)) 
     {


More information about the gmp-commit mailing list