Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64091 - in sandbox/SOC/2010/bit_masks/lib/integer/test: . bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-07-17 09:08:34


Author: bbartman
Date: 2010-07-17 09:08:34 EDT (Sat, 17 Jul 2010)
New Revision: 64091
URL: http://svn.boost.org/trac/boost/changeset/64091

Log:
re organizing my tests and in preperation for implementing of custom member and pointer member
Added:
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/bitfield_tuple_test.cpp
      - copied unchanged from r64090, /sandbox/SOC/2010/bit_masks/lib/integer/test/bitfield_tuple_test.cpp
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/custom_member_test.cpp (contents, props changed)
Removed:
   sandbox/SOC/2010/bit_masks/lib/integer/test/bitfield_tuple_test.cpp
Text files modified:
   sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2 | 3 ++-
   1 files changed, 2 insertions(+), 1 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-17 09:08:34 EDT (Sat, 17 Jul 2010)
@@ -35,7 +35,7 @@
         [ compile-fail bft_testing/compile_fail/set_storage_more_then_once.cpp ]
         [ compile-fail bft_testing/compile_fail/one_name_two_members.cpp ]
         [ compile bft_testing/compile_pass/bft_member_max_out.cpp ]
- [ run bitfield_tuple_test.cpp ]
+ [ run bft_testing/bitfield_tuple_test.cpp ]
         [ run bft_testing/name_accessor_test.cpp ]
         [ run bft_testing/get_interface_test.cpp ]
         [ run bft_testing/compile_pass/fusion_includes.cpp ]
@@ -51,6 +51,7 @@
         [ run bft_testing/deduced_storage_type_long_long_test.cpp ]
         [ run bft_testing/make_bft_testing.cpp ]
         [ run bft_testing/boost_endian_integration_test.cpp ]
+ [ run bft_testing/custom_member_test.cpp ]
         [ run ppb_testing/pointer_plus_bits_test.cpp ]
 
 

Added: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/custom_member_test.cpp
==============================================================================

Deleted: sandbox/SOC/2010/bit_masks/lib/integer/test/bitfield_tuple_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bitfield_tuple_test.cpp 2010-07-17 09:08:34 EDT (Sat, 17 Jul 2010)
+++ (empty file)
@@ -1,54 +0,0 @@
-// 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 <boost/integer/bitfield_tuple.hpp>
-#include "test_type_list.hpp"
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/find_if.hpp>
-#include <boost/mpl/end.hpp>
-#include <boost/mpl/begin.hpp>
-
-using namespace boost::bitfields;
-void ignore(...) {}
-
-struct red { };
-struct green { };
-struct blue { };
-
-template <typename T>
-void test_get_data(T const& x, int value) {
- BOOST_ASSERT(( x.get_data() == value ));
-}
-
-
-int main() {
- // testing bitfield_element
- {
- // bitfield_element
- typedef detail::bitfield_element<
- int, red, mpl::size_t<5>, mpl::size_t<4>
- > bft_element_test_1;
- BOOST_ASSERT(( is_same<bft_element_test_1::return_type, int>::value ));
- BOOST_ASSERT(( is_same<bft_element_test_1::name_type, red>::value ));
- BOOST_ASSERT(( bft_element_test_1::offset::value == 5 ));
- BOOST_ASSERT(( bft_element_test_1::field_width::value == 4 ));
-
- }
-
- // bitfield_tuple runtime tests.
- // additional tests preformed in the bft_testing folder.
- {
- // default constructor.
- typedef bitfield_tuple< storage<int>, member<int,red,3> > bft1;
- bft1 bft_test_1;
- BOOST_ASSERT(( bft_test_1.data() == 0 ));
-
- // value constructor
- bft1 bft_test_2(5);
- BOOST_ASSERT(( bft_test_2.data() == 5 ));
-
- }
- 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