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

mercurial at gmplib.org mercurial at gmplib.org
Thu May 24 15:28:31 CEST 2012


details:   /var/hg/gmp/rev/47f7b78a0fba
changeset: 15004:47f7b78a0fba
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu May 24 15:27:35 2012 +0200
description:
Print \r only terminally.

details:   /var/hg/gmp/rev/d94adfcddabb
changeset: 15005:d94adfcddabb
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu May 24 15:28:25 2012 +0200
description:
Trivial merge.

diffstat:

 ChangeLog            |   2 +-
 tests/mpz/reuse.c    |   3 ++-
 tests/mpz/t-remove.c |  19 +------------------
 3 files changed, 4 insertions(+), 20 deletions(-)

diffs (54 lines):

diff -r 58193dcd0b8e -r d94adfcddabb ChangeLog
--- a/ChangeLog	Thu May 24 11:52:14 2012 +0200
+++ b/ChangeLog	Thu May 24 15:28:25 2012 +0200
@@ -5,7 +5,7 @@
 2012-05-24 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpz/remove.c: Support negative divisor.
-	* tests/mpz/t-remove.c: Test zero dividend and negative divisor.
+	* tests/mpz/t-remove.c: Test negative divisor.
 
 2012-05-23  Torbjorn Granlund  <tege at gmplib.org>
 
diff -r 58193dcd0b8e -r d94adfcddabb tests/mpz/reuse.c
--- a/tests/mpz/reuse.c	Thu May 24 11:52:14 2012 +0200
+++ b/tests/mpz/reuse.c	Thu May 24 15:28:25 2012 +0200
@@ -679,7 +679,8 @@
   mpz_clear (res3);
   mpz_clear (t);
 
-  printf ("\r");
+  if (isatty (fileno (stdout)))
+    printf ("\r");
 
   tests_end ();
   exit (0);
diff -r 58193dcd0b8e -r d94adfcddabb tests/mpz/t-remove.c
--- a/tests/mpz/t-remove.c	Thu May 24 11:52:14 2012 +0200
+++ b/tests/mpz/t-remove.c	Thu May 24 15:28:25 2012 +0200
@@ -47,24 +47,7 @@
   if (argc == 2)
     reps = atoi (argv[1]);
 
-  mpz_inits (bs, t, refdest, dividend, NULL);
-
-  mpz_init_set_si (dest, -3);
-  mpz_init_set_ui (divisor, 3);
-  pwr = mpz_remove (dest, dividend, divisor);
-
-  /* Perhaps we shouldn't check pwr... */
-  if (pwr != 0 || mpz_cmp_ui (dest, 0) != 0)
-    {
-      fprintf (stderr, "ERROR with zero test\n");
-      fprintf (stderr, "refpower = %lu\n", 0);
-      fprintf (stderr, "   power = %lu\n", pwr);
-      fprintf (stderr, "    op1 = "); debug_mp (dividend);
-      fprintf (stderr, "    op2 = "); debug_mp (divisor);
-      fprintf (stderr, "refdest = 0\n");
-      fprintf (stderr, "   dest = "); debug_mp (dest);
-      abort ();
-    }
+  mpz_inits (bs, t, dest, refdest, dividend, divisor, NULL);
 
   for (i = 0; i < reps; i++)
     {


More information about the gmp-commit mailing list