[SCM] polybori: Polynomials over Boolean Rings branch, upstream-hg, updated. b4a5cffaa908c53e1d958a42110f8c4dad853aa3
Alexander Dreyer
adreyer at gmx.de
Fri Mar 23 08:01:31 UTC 2012
The following commit has been merged in the upstream-hg branch:
commit 49635673a7b4fa02e504d9c79d5834d357623920
Author: Alexander Dreyer <adreyer at gmx.de>
Date: Sun Feb 26 23:15:53 2012 +0100
FIX: more portable test
diff --git a/testsuite/src/DelayedLongProductTest.cc b/testsuite/src/DelayedLongProductTest.cc
index 82ec03b..8218acf 100644
--- a/testsuite/src/DelayedLongProductTest.cc
+++ b/testsuite/src/DelayedLongProductTest.cc
@@ -25,7 +25,8 @@ USING_NAMESPACE_PBORIGB
struct Fdelayedlongprod {
typedef unsigned long long_type;
- Fdelayedlongprod() {
+ unsigned nhalf;
+ Fdelayedlongprod(): nhalf(sizeof(long_type)*4) {
BOOST_TEST_MESSAGE( "setup fixture" );
}
@@ -69,12 +70,12 @@ BOOST_AUTO_TEST_CASE(test_less) {
BOOST_CHECK_EQUAL((DelayedLongProduct(5, 7) > 35), false);
BOOST_CHECK_EQUAL((DelayedLongProduct(5, 7) > 36), false);
- BOOST_CHECK_EQUAL((DelayedLongProduct(long_type(5)<<32, 7) >
- long_type(34)<<32), true);
- BOOST_CHECK_EQUAL((DelayedLongProduct(long_type(5)<<32, 7) >
- long_type(35)<<32), false);
- BOOST_CHECK_EQUAL((DelayedLongProduct(long_type(5)<<32, 7) >
- long_type(36)<<32), false);
+ BOOST_CHECK_EQUAL((DelayedLongProduct(long_type(5)<<nhalf, 7) >
+ long_type(34)<<nhalf), true);
+ BOOST_CHECK_EQUAL((DelayedLongProduct(long_type(5)<<nhalf, 7) >
+ long_type(35)<<nhalf), false);
+ BOOST_CHECK_EQUAL((DelayedLongProduct(long_type(5)<<nhalf, 7) >
+ long_type(36)<<nhalf), false);
BOOST_CHECK_EQUAL((DelayedLongProduct(5, long_type(7)<<32) >
long_type(34)<<32), true);
--
polybori: Polynomials over Boolean Rings
More information about the debian-science-commits
mailing list