|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r62059 - in sandbox/SOC/2010/bit_masks: boost/integer lib/integer/test
From: bbartmanboost_at_[hidden]
Date: 2010-05-17 08:42:11
Author: bbartman
Date: 2010-05-17 08:42:10 EDT (Mon, 17 May 2010)
New Revision: 62059
URL: http://svn.boost.org/trac/boost/changeset/62059
Log:
begining testing work for integral_mask runtime support functions
Text files modified:
sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp | 3 +
sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2 | 1
sandbox/SOC/2010/bit_masks/lib/integer/test/bitwise_integral_mask_testing.cpp | 56 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 1 deletions(-)
Modified: sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp (original)
+++ sandbox/SOC/2010/bit_masks/boost/integer/integral_mask.hpp 2010-05-17 08:42:10 EDT (Mon, 17 May 2010)
@@ -8,7 +8,6 @@
#ifndef BOOST_INTEGRAL_MASK_HPP
#define BOOST_INTEGRAL_MASK_HPP
-#include <boost/integer/high_low_bits.hpp>
#include <boost/type_traits.hpp>
#include <boost/static_assert.hpp>
#include <boost/integer/bit_width.hpp>
@@ -41,4 +40,6 @@
} // namespace boost
+#include <boost/integer/details/integral_mask_support_functions.hpp>
+
#endif
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-05-17 08:42:10 EDT (Mon, 17 May 2010)
@@ -20,5 +20,6 @@
[ run low_bit_mask_test.cpp ]
[ run bit_width_test.cpp ]
[ run bitwise_operator_test.cpp ]
+ [ run bitwise_integral_mask_testing.cpp ]
;
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bitwise_integral_mask_testing.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bitwise_integral_mask_testing.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bitwise_integral_mask_testing.cpp 2010-05-17 08:42:10 EDT (Mon, 17 May 2010)
@@ -0,0 +1,56 @@
+// Copyright 2010 Brian Bartman.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+
+#include "test_type_list.hpp"
+#include <boost/integer/integral_mask.hpp>
+
+
+
+// Testing for operator overloads.
+using namespace boost;
+
+template <typename T>
+void test_function() {
+
+ // operator &(T, bit_mask)
+ T bit_result = T(0) & integral_mask<T, 1>();
+
+ // operator &(integral_mask, T)
+ bit_result = integral_mask<T, 1>() & T(0);
+
+ // operator |(T, integral_mask)
+ // bit_result = T(0) | bit_mask<T,1>();
+
+ // operator |(integral_mask, T)
+ // bit_result = T(0) | integral_mask<T,1>();
+
+ // operator |(T, integral_mask)
+ // bit_result = integral_mask<T,1>() | T(0);
+
+ // operator ^(integral_mask, T)
+ // bit_result = T(0) ^ integral_mask<T,1>();
+
+ // operator ^(T, bit_mask)
+ // bit_result = integral_mask<T,1>() ^ T(0);
+}
+
+
+struct type_tester {
+ template< typename U >
+ void operator()(U) {
+ test_function<U>();
+ }
+};
+
+
+int main() {
+ mpl::for_each< test_types >( type_tester() );
+ mpl::for_each< test_types_2 >( type_tester() );
+ mpl::for_each< test_types_3 >( type_tester() );
+
+ return 0;
+}
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