summaryrefslogtreecommitdiff
path: root/tests/cxx
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2011-08-21 20:08:38 +0200
committerMarc Glisse <marc.glisse@inria.fr>2011-08-21 20:08:38 +0200
commitaf14b70ec142e9ce184456a40ee322cc1370c155 (patch)
tree57a2a869778035515ce55043c0910925da805595 /tests/cxx
parentce54f55991d1337d4bd3ca01e7fbe2526e27f266 (diff)
downloadgmp-af14b70ec142e9ce184456a40ee322cc1370c155.tar.gz
__builtin_constant_p optimizations to turn x+0 into x, x*4 into x<<2, etc, all done in the C++ layer.
Also rewrote the addition of rational and integer which always did a mpq_set first.
Diffstat (limited to 'tests/cxx')
-rw-r--r--tests/cxx/t-ops2.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/cxx/t-ops2.cc b/tests/cxx/t-ops2.cc
index 0501ab2e0..9a6e7e020 100644
--- a/tests/cxx/t-ops2.cc
+++ b/tests/cxx/t-ops2.cc
@@ -98,6 +98,9 @@ void checkz (){
CHECK_ALL_SIGNS(mpz_class,11,3,*);
CHECK_ALL_SIGNS(mpz_class,11,3,/);
CHECK_ALL_SIGNS(mpz_class,11,3,%);
+ CHECK_ALL_SIGNS(mpz_class,17,2,*);
+ CHECK_ALL_SIGNS(mpz_class,17,2,/);
+ CHECK_ALL_SIGNS(mpz_class,17,2,%);
CHECK(unsigned long,mpz_class,5,-2,/);
CHECK(unsigned long,mpz_class,5,-2,%);
ASSERT_ALWAYS(7ul/mpz_class(1e100)==0);