Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64307 - in sandbox/SOC/2010/bit_masks/lib/integer/test: . bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-07-23 14:27:35


Author: bbartman
Date: 2010-07-23 14:27:34 EDT (Fri, 23 Jul 2010)
New Revision: 64307
URL: http://svn.boost.org/trac/boost/changeset/64307

Log:
fixed the 64 bit test under Linux 64 bit and everything is working again
Text files modified:
   sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2 | 1
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fails_on_64_bit.cpp | 48 ++++++++++++++++++++++++++++++++++++++++
   2 files changed, 49 insertions(+), 0 deletions(-)

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2 (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2 2010-07-23 14:27:34 EDT (Fri, 23 Jul 2010)
@@ -54,6 +54,7 @@
         [ run bft_testing/custom_member_test.cpp ]
         [ run bft_testing/pointer_member_test.cpp ]
         [ run bft_testing/pointer_parsing_meta_function_test.cpp ]
+ [ run bft_testing/fails_on_64_bit.cpp ]
         [ run ppb_testing/pointer_plus_bits_test.cpp ]
 
 

Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fails_on_64_bit.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fails_on_64_bit.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fails_on_64_bit.cpp 2010-07-23 14:27:34 EDT (Fri, 23 Jul 2010)
@@ -0,0 +1,48 @@
+#include <boost/integer/endian.hpp>
+#include <boost/integer/endian_binary_stream.hpp>
+#include <boost/binary_stream.hpp>
+
+#include <boost/integer/bitfield_tuple.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+// used for working with the special conversion tools for creating
+// specific endianed storage.
+#include <boost/type_traits/is_convertible.hpp>
+
+#include <boost/mpl/bitwise.hpp>
+#include <boost/mpl/arithmetic.hpp>
+#include <climits>
+
+#include <boost/assert.hpp>
+#include <iostream>
+#include <typeinfo>
+#include <cstdio>
+
+
+struct red;
+struct green;
+struct blue;
+
+using namespace boost;
+using namespace boost::integer;
+using namespace boost::bitfields;
+
+typedef bitfield_tuple<
+ storage< big32_t >,
+ member<unsigned char, red, 5>,
+ member<unsigned char, green, 6>,
+ member<unsigned char, blue, 5>
+> rgb565_t;
+
+
+
+int main() {
+ {
+ rgb565_t rgb565;
+ rgb565.get<red>() = 3;
+ BOOST_TEST(rgb565.get<red>() == 3);
+ rgb565.get<0>() = 4;
+ BOOST_TEST(rgb565.get<0>() == 4);
+ }
+ return boost::report_errors();
+}


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