[Gmp-commit] /var/hg/gmp: More C++ tests.

mercurial at gmplib.org mercurial at gmplib.org
Sun May 1 09:32:34 CEST 2011


details:   /var/hg/gmp/rev/12fcd37fbe9f
changeset: 14148:12fcd37fbe9f
user:      Marc Glisse <marc.glisse at inria.fr>
date:      Sun May 01 09:32:28 2011 +0200
description:
More C++ tests.

diffstat:

 ChangeLog           |  2 ++
 tests/cxx/t-ops2.cc |  6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r 027a1a540c8b -r 12fcd37fbe9f ChangeLog
--- a/ChangeLog	Sat Apr 30 10:17:52 2011 +0200
+++ b/ChangeLog	Sun May 01 09:32:28 2011 +0200
@@ -8,6 +8,8 @@
 	* ltmain.sh: Remove.
 	* .bootstrap: Let libtoolize generate ltmain.sh.
 
+	* tests/cxx/t-ops2.cc: Add a couple tests.
+
 2011-04-28  Torbjorn Granlund  <tege at gmplib.org>
 
 	* configure.in (x86_64): Support bobcat specifically.
diff -r 027a1a540c8b -r 12fcd37fbe9f tests/cxx/t-ops2.cc
--- a/tests/cxx/t-ops2.cc	Sat Apr 30 10:17:52 2011 +0200
+++ b/tests/cxx/t-ops2.cc	Sun May 01 09:32:28 2011 +0200
@@ -98,6 +98,12 @@
   CHECK_ALL_SIGNS(mpz_class,11,3,*);
   CHECK_ALL_SIGNS(mpz_class,11,3,/);
   CHECK_ALL_SIGNS(mpz_class,11,3,%);
+  CHECK(unsigned long,mpz_class,5,-2,/);
+  CHECK(unsigned long,mpz_class,5,-2,%);
+  ASSERT_ALWAYS(7ul/mpz_class(1e100)==0);
+  ASSERT_ALWAYS(7ul%mpz_class(1e100)==7);
+  ASSERT_ALWAYS(7ul/mpz_class(-1e100)==0);
+  ASSERT_ALWAYS(7ul%mpz_class(-1e100)==7);
   CHECK_ALL_SIGNS_COMPARISONS(mpz_class,11,3);
   CHECK_ALL(mpz_class,6,3,&);
   CHECK_ALL(mpz_class,6,3,|);


More information about the gmp-commit mailing list