Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64452 - in sandbox/SOC/2010/bit_masks: . lib/integer/test lib/integer/test/bft_testing/compile_fail
From: bbartmanboost_at_[hidden]
Date: 2010-07-29 14:25:11


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

Log:
added additional compile failure tests for more of the interface meta-functions
Added:
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/find_by_index_with_indvalid_index.cpp (contents, props changed)
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/find_by_name_with_missing_name.cpp (contents, props changed)
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/get_proxy_reference_type_by_index_index_does_not_exist.cpp (contents, props changed)
   sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/get_proxy_reference_type_by_name_name_does_not_exist.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 | 3 +--
   2 files changed, 7 insertions(+), 2 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:25:10 EDT (Thu, 29 Jul 2010)
@@ -37,6 +37,12 @@
         [ 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-fail bft_testing/compile_fail/find_by_index_with_indvalid_index.cpp ]
+ [ 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 ]

Added: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/find_by_index_with_indvalid_index.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/find_by_index_with_indvalid_index.cpp 2010-07-29 14:25:10 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 3 isn't a valid index.
+typedef bitfield_tuple<
+ storage<int>,
+ member<int,red,2>
+> bft;
+
+
+
+int main() {
+ typedef find_by_element_index<bft,3>::type t;
+ return 0;
+}

Added: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/find_by_name_with_missing_name.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/find_by_name_with_missing_name.cpp 2010-07-29 14:25:10 EDT (Thu, 29 Jul 2010)
@@ -0,0 +1,26 @@
+// 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 { };
+struct pink;
+
+// fails because pink isn't a valid name
+typedef bitfield_tuple<
+ storage<int>,
+ member<int,red,2>
+> bft;
+
+
+
+int main() {
+ typedef find_by_element_name<bft,pink>::type t;
+ return 0;
+}

Added: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/get_proxy_reference_type_by_index_index_does_not_exist.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/get_proxy_reference_type_by_index_index_does_not_exist.cpp 2010-07-29 14:25:10 EDT (Thu, 29 Jul 2010)
@@ -0,0 +1,27 @@
+// 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 { };
+struct pink;
+
+// fails because pink isn't a valid name
+typedef bitfield_tuple<
+ storage<int>,
+ member<int,red,2>
+> bft;
+
+
+
+int main() {
+ typedef get_proxy_reference_type_by_index<bft,3>::type t;
+ t();
+ return 0;
+}

Added: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/get_proxy_reference_type_by_name_name_does_not_exist.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/compile_fail/get_proxy_reference_type_by_name_name_does_not_exist.cpp 2010-07-29 14:25:10 EDT (Thu, 29 Jul 2010)
@@ -0,0 +1,27 @@
+// 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 { };
+struct pink;
+
+// fails because pink isn't a valid name
+typedef bitfield_tuple<
+ storage<int>,
+ member<int,red,2>
+> bft;
+
+
+
+int main() {
+ typedef get_proxy_reference_type_by_name<bft,pink>::type t;
+ t();
+ 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 14:25:10 EDT (Thu, 29 Jul 2010)
@@ -80,8 +80,7 @@
 
 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.
-10) Create compile failure test for find_by_element_index index does not exist.
+
 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


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