Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64453 - in sandbox/SOC/2010/bit_masks: . lib/integer/test lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-07-29 14:34:24


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

Log:
completed tests for element
Added:
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/element_n_test.cpp (contents, props changed)
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/element_test.cpp (contents, props changed)
Text files modified:
   sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2 | 6 ++----
   sandbox/SOC/2010/bit_masks/notes.txt | 9 ---------
   2 files changed, 2 insertions(+), 13 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-29 14:34:23 EDT (Thu, 29 Jul 2010)
@@ -41,8 +41,6 @@
         [ compile-fail bft_testing/compile_fail/find_by_name_with_missing_name.cpp ]
         [ compile-fail bft_testing/compile_fail/get_proxy_reference_type_by_name_name_does_not_exist.cpp ]
         [ compile-fail bft_testing/compile_fail/get_proxy_reference_type_by_index_index_does_not_exist.cpp ]
-
-
         [ compile bft_testing/compile_pass/bft_member_max_out.cpp ]
         [ run bft_testing/bitfield_tuple_test.cpp ]
         [ run bft_testing/name_accessor_test.cpp ]
@@ -63,13 +61,13 @@
         [ 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/variadic_sequence_20_test.cpp ]
         [ run bft_testing/variadic_sequence_30_test.cpp ]
         [ run bft_testing/variadic_sequence_40_test.cpp ]
         [ run bft_testing/variadic_sequence_50_test.cpp ]
         [ run bft_testing/interface_meta_function_test.cpp ]
         [ run bft_testing/clz_ctz_test.cpp ]
+ [ run bft_testing/element_test.cpp ]
+ [ run bft_testing/element_n_test.cpp ]
     ;
 

Added: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/element_n_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/element_n_test.cpp 2010-07-29 14:34:23 EDT (Thu, 29 Jul 2010)
@@ -0,0 +1,39 @@
+// 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 <boost/detail/lightweight_test.hpp>
+
+
+using namespace boost;
+using namespace boost::bitfields;
+struct red;
+struct green;
+struct pink;
+struct blue;
+struct salmon;
+typedef bitfield_tuple<
+ member<char,red,4>,
+ member<unsigned char, green,5>,
+ storage<std::size_t>,
+ padding<3>,
+ member<int, salmon, 16>,
+ flag<blue>,
+ bitfields::align<32>
+> test_tuple_1;
+
+int main() {
+ {
+ typedef element<test_tuple_1,0>::type type;
+ BOOST_TEST((
+ is_same<
+ bitfields::detail::enable_if_proxy_reference_type_by_index<test_tuple_1,0>::type,
+ element<test_tuple_1,0>::type
+ >::type::value
+ ));
+ }
+ return boost::report_errors();
+}

Added: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/element_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/element_test.cpp 2010-07-29 14:34:23 EDT (Thu, 29 Jul 2010)
@@ -0,0 +1,42 @@
+// 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 <boost/detail/lightweight_test.hpp>
+
+
+using namespace boost;
+using namespace boost::bitfields;
+
+struct red;
+struct green;
+struct pink;
+struct blue;
+struct salmon;
+
+typedef bitfield_tuple<
+ member<char,red,4>,
+ member<unsigned char, green,5>,
+ storage<std::size_t>,
+ padding<3>,
+ member<int, salmon, 16>,
+ flag<blue>,
+ bitfields::align<32>
+> test_tuple_1;
+
+
+int main() {
+ {
+ typedef element_n<test_tuple_1,salmon>::type type;
+ BOOST_TEST((
+ is_same<
+ bitfields::detail::disable_if_proxy_reference_type_by_name<test_tuple_1,salmon>::type,
+ type
+ >::type::value
+ ));
+ }
+ return boost::report_errors();
+}

Modified: sandbox/SOC/2010/bit_masks/notes.txt
==============================================================================
--- sandbox/SOC/2010/bit_masks/notes.txt (original)
+++ sandbox/SOC/2010/bit_masks/notes.txt 2010-07-29 14:34:23 EDT (Thu, 29 Jul 2010)
@@ -76,17 +76,8 @@
                         TO BE ADDED TO TESTS SECTION
     Test which need to be created as a result of modifications or additions!
 --------------------------------------------------------------------------------
-
-
 7) Create test for element and element_n
 8) Create test for get_free_function.
-
-11) Create compile failure test for get_proxy_reference_type_by_name name does
- not exist.
-12) Create compile failure test for get_proxy_reference_type_by_index index does
- not exist.
-
-
 --------------------------------------------------------------------------------
 
 


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