[Gmp-commit] /var/hg/gmp: Minor test changes.

mercurial at gmplib.org mercurial at gmplib.org
Sat May 7 08:58:22 CEST 2011


details:   /var/hg/gmp/rev/38f781cecdcc
changeset: 14171:38f781cecdcc
user:      Marc Glisse <marc.glisse at inria.fr>
date:      Sat May 07 08:58:19 2011 +0200
description:
Minor test changes.

diffstat:

 ChangeLog             |  3 +++
 tests/cxx/t-assign.cc |  2 +-
 tests/cxx/t-misc.cc   |  4 ++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 4db44a7c9293 -r 38f781cecdcc ChangeLog
--- a/ChangeLog	Fri May 06 23:31:07 2011 +0200
+++ b/ChangeLog	Sat May 07 08:58:19 2011 +0200
@@ -7,6 +7,9 @@
 	* tests/cxx/t-mix.cc: New file.
 	* tests/cxx/Makefile.am: Added t-mix.
 
+	* tests/cxx/t-assign.cc: Minor tweak.
+	* tests/cxx/t-misc.cc: Likewise.
+
 2011-05-05  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpz/gcdext.c: Correct sgn computation.
diff -r 4db44a7c9293 -r 38f781cecdcc tests/cxx/t-assign.cc
--- a/tests/cxx/t-assign.cc	Fri May 06 23:31:07 2011 +0200
+++ b/tests/cxx/t-assign.cc	Sat May 07 08:58:19 2011 +0200
@@ -257,7 +257,7 @@
   // operator=(unsigned short int)
   {
     unsigned short int a = 54321u;
-    mpz_class b;
+    mpq_class b;
     b = a; ASSERT_ALWAYS(b == 54321u);
   }
 
diff -r 4db44a7c9293 -r 38f781cecdcc tests/cxx/t-misc.cc
--- a/tests/cxx/t-misc.cc	Fri May 06 23:31:07 2011 +0200
+++ b/tests/cxx/t-misc.cc	Sat May 07 08:58:19 2011 +0200
@@ -186,7 +186,7 @@
 
   // mpq_class::get_num, mpq_class::get_den
   {
-    mpq_class  q(4,5);
+    const mpq_class  q(4,5);
     mpz_class  z;
     z = q.get_num(); ASSERT_ALWAYS (z == 4);
     z = q.get_den(); ASSERT_ALWAYS (z == 5);
@@ -200,7 +200,7 @@
     p = q.get_den_mpz_t(); ASSERT_ALWAYS (mpz_cmp_ui (p, 5) == 0);
   }
   {
-    mpq_class  q(4,5);
+    const mpq_class  q(4,5);
     mpz_srcptr p;
     p = q.get_num_mpz_t(); ASSERT_ALWAYS (mpz_cmp_ui (p, 4) == 0);
     p = q.get_den_mpz_t(); ASSERT_ALWAYS (mpz_cmp_ui (p, 5) == 0);


More information about the gmp-commit mailing list