Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63793 - in sandbox/SOC/2010/bit_masks/lib/integer/test: . bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-07-09 16:25:23


Author: bbartman
Date: 2010-07-09 16:25:22 EDT (Fri, 09 Jul 2010)
New Revision: 63793
URL: http://svn.boost.org/trac/boost/changeset/63793

Log:
working on fixing a small bug
Text files modified:
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/boost_endian_integration_test.cpp | 2 +-
   sandbox/SOC/2010/bit_masks/lib/integer/test/high_bit_mask_test.cpp | 28 +++++++++++++++++++++++++++-
   2 files changed, 28 insertions(+), 2 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/boost_endian_integration_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/boost_endian_integration_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/boost_endian_integration_test.cpp 2010-07-09 16:25:22 EDT (Fri, 09 Jul 2010)
@@ -279,7 +279,7 @@
>::type step_four;
         printf("Step 4: %0x\n", step_four::value );
 
- BOOST_TEST(false);
+ // BOOST_TEST(false);
 
     }
     {

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/high_bit_mask_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/high_bit_mask_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/high_bit_mask_test.cpp 2010-07-09 16:25:22 EDT (Fri, 09 Jul 2010)
@@ -7,6 +7,8 @@
 
 #include <boost/integer/high_low_bits.hpp>
 #include "test_type_list.hpp"
+#include <iostream>
+#include <typeinfo>
 
 // tesitng for bit width.
 using namespace boost;
@@ -14,17 +16,41 @@
 template <typename T>
 void test_function() {
 
+ using namespace std;
+ cout << "Starting test. Test Type = " << typeid(T).name() << endl;
     // making sure that the value type is transfered correctly.
     BOOST_ASSERT((is_same< typename high_bits_mask<T, 3>::value_type, T >::value));
 
-
+ cout << "Mask Value: " << boost::high_bits_mask<T,1>::value << endl;
+ cout << "Test Value: " << ~(~(T(0)) >> 1) << endl;
     BOOST_ASSERT(( boost::high_bits_mask<T,1>::value == ~(~(T(0)) >> 1) ));
+
+ cout << "Mask Value: " << boost::high_bits_mask<T,2>::value << endl;
+ cout << "Test Value: " << ~(~(T(0)) >> 2) << endl;
     BOOST_ASSERT(( boost::high_bits_mask<T,2>::value == ~(~(T(0)) >> 2) ));
+
+ cout << "Mask Value: " << boost::high_bits_mask<T,3>::value << endl;
+ cout << "Test Value: " << ~(~(T(0)) >> 3) << endl;
     BOOST_ASSERT(( boost::high_bits_mask<T,3>::value == ~(~(T(0)) >> 3) ));
+
+ cout << "Mask Value: " << boost::high_bits_mask<T,4>::value << endl;
+ cout << "Test Value: " << ~(~(T(0)) >> 4) << endl;
     BOOST_ASSERT(( boost::high_bits_mask<T,4>::value == ~(~(T(0)) >> 4) ));
+
+ cout << "Mask Value: " << boost::high_bits_mask<T,5>::value << endl;
+ cout << "Test Value: " << ~(~(T(0)) >> 5) << endl;
     BOOST_ASSERT(( boost::high_bits_mask<T,5>::value == ~(~(T(0)) >> 5) ));
+
+ cout << "Mask Value: " << boost::high_bits_mask<T,6>::value << endl;
+ cout << "Test Value: " << ~(~(T(0)) >> 6) << endl;
     BOOST_ASSERT(( boost::high_bits_mask<T,6>::value == ~(~(T(0)) >> 6) ));
+
+ cout << "Mask Value: " << boost::high_bits_mask<T,7>::value << endl;
+ cout << "Test Value: " << ~(~(T(0)) >> 7) << endl;
     BOOST_ASSERT(( boost::high_bits_mask<T,7>::value == ~(~(T(0)) >> 7) ));
+
+ cout << "Mask Value: " << boost::high_bits_mask<T,8>::value << endl;
+ cout << "Test Value: " << ~(~(T(0)) >> 8) << endl;
     BOOST_ASSERT(( boost::high_bits_mask<T,8>::value == ~(~(T(0)) >> 8) ));
 
     // assert that type returns the correct typedef.


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk