Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64451 - in sandbox/SOC/2010/bit_masks: . lib/integer/test lib/integer/test/bft_testing/compile_fail
From: bbartmanboost_at_[hidden]
Date: 2010-07-29 13:19:47


Author: bbartman
Date: 2010-07-29 13:19:46 EDT (Thu, 29 Jul 2010)
New Revision: 64451
URL: http://svn.boost.org/trac/boost/changeset/64451

Log:
working on creating compile failure test for custom member

Added:
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/custom_member_mask_is_zero.cpp (contents, props changed)
Text files modified:
   sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2 | 1 +
   sandbox/SOC/2010/bit_masks/notes.txt | 4 +---
   2 files changed, 2 insertions(+), 3 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 13:19:46 EDT (Thu, 29 Jul 2010)
@@ -36,6 +36,7 @@
         [ compile-fail bft_testing/compile_fail/one_name_two_members.cpp ]
         [ compile-fail bft_testing/compile_fail/pointer_member_with_zero_mask.cpp ]
         [ compile-fail bft_testing/compile_fail/pointer_mask_not_same_size_as_pointer.cpp ]
+ [ compile-fail bft_testing/compile_fail/custom_member_mask_is_zero.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 ]

Added: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/custom_member_mask_is_zero.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/custom_member_mask_is_zero.cpp 2010-07-29 13:19:46 EDT (Thu, 29 Jul 2010)
@@ -0,0 +1,25 @@
+// 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>
+
+using namespace boost;
+using namespace boost::bitfields;
+
+struct red { };
+
+// fails because the mask isn't the same size as the pointer.
+typedef bitfield_tuple<
+ storage<int>,
+ custom<unsigned short,red,integral_constant<unsigned short, 0> >
+> bft;
+
+
+
+int main() {
+ bft();
+ return 0;
+}

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 13:19:46 EDT (Thu, 29 Jul 2010)
@@ -76,10 +76,8 @@
                         TO BE ADDED TO TESTS SECTION
     Test which need to be created as a result of modifications or additions!
 --------------------------------------------------------------------------------
-5) Create compile failure test for pointer member mask not being same size as
- pointer.
 
-6) Create compile Failure test for custom member mask being 0.
+
 7) Create test for element and element_n
 8) Create test for get_free_function.
 9) Create compile failure test for find_by_element_name name 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