Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62731 - in sandbox/SOC/2010/bit_masks/lib/integer/test: . bft_testing/compile_fail
From: bbartmanboost_at_[hidden]
Date: 2010-06-10 09:07:50


Author: bbartman
Date: 2010-06-10 09:07:49 EDT (Thu, 10 Jun 2010)
New Revision: 62731
URL: http://svn.boost.org/trac/boost/changeset/62731

Log:
adding compile failure tests for checking preconditions for bitfield_tuple class
Added:
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/member_precond_width_zero.cpp (contents, props changed)
Text files modified:
   sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2 | 1 +
   1 files changed, 1 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-06-10 09:07:49 EDT (Thu, 10 Jun 2010)
@@ -26,5 +26,6 @@
         [ run compound_mask_test.cpp ]
         [ run bit_mask_group_test.cpp ]
         [ run bitfield_tuple_test.cpp ]
+ [ compile-fail bft_testing/compile_fail/member_precond_width_zero.cpp ]
     ;
 

Added: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/member_precond_width_zero.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/member_precond_width_zero.cpp 2010-06-10 09:07:49 EDT (Thu, 10 Jun 2010)
@@ -0,0 +1,17 @@
+// 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/details/member.hpp>
+
+using namespace boost;
+
+// this fails when the assert for the precondition within member restricting
+// it to be something other then 0 fails.
+struct pink;
+
+int main() {
+ typedef member<int,pink,0>::type failure;
+}


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