[Gmp-commit] /var/hg/gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Sun May 24 10:22:13 UTC 2015


details:   /var/hg/gmp/rev/88ae0a99ca79
changeset: 16653:88ae0a99ca79
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun May 24 12:19:09 2015 +0200
description:
tests/mpq/reuse.c: test also fun (x,x,x)

details:   /var/hg/gmp/rev/43c78f831b77
changeset: 16654:43c78f831b77
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun May 24 12:21:04 2015 +0200
description:
ChangeLog

diffstat:

 ChangeLog         |   1 +
 tests/mpq/reuse.c |  14 +++++++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r 22634990320f -r 43c78f831b77 ChangeLog
--- a/ChangeLog	Sun May 24 09:51:09 2015 +0200
+++ b/ChangeLog	Sun May 24 12:21:04 2015 +0200
@@ -1,6 +1,7 @@
 2015-05-24 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpq/div.c: Reduce memory use.
+	* tests/mpq/reuse.c: Test also mpq_FUNCTION (x,x,x). 
 	* mpz/swap.c: Use _SWAP macros.
 
 2015-05-18  Torbjörn Granlund  <torbjorng at google.com>
diff -r 22634990320f -r 43c78f831b77 tests/mpq/reuse.c
--- a/tests/mpq/reuse.c	Sun May 24 09:51:09 2015 +0200
+++ b/tests/mpq/reuse.c	Sun May 24 12:21:04 2015 +0200
@@ -1,6 +1,6 @@
 /* Test that routines allow reusing a source variable as destination.
 
-Copyright 1996, 2000-2002, 2012 Free Software Foundation, Inc.
+Copyright 1996, 2000-2002, 2012, 2015 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library test suite.
 
@@ -165,6 +165,18 @@
 	    dump_abort (dss_func_names[i], res1, res2);
 	  if (mpq_cmp (res1, res3) != 0)
 	    dump_abort (dss_func_names[i], res1, res3);
+
+	  mpq_set (out1, in2);
+	  (dss_funcs[i]) (res1, out1, in2);
+
+	  (dss_funcs[i]) (res2, in2, in2);
+
+	  (dss_funcs[i]) (out1, out1, out1);
+
+	  if (mpq_cmp (res1, res2) != 0)
+	    dump_abort (dss_func_names[i], res1, res2);
+	  if (mpq_cmp (res1, out1) != 0)
+	    dump_abort (dss_func_names[i], res1, out1);
 	}
 
       for (i = 0; i < sizeof (ds_funcs) / sizeof (ds_func); i++)


More information about the gmp-commit mailing list