|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63212 - in sandbox/SOC/2010/bit_masks/lib/integer/test: . bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-06-21 18:41:48
Author: bbartman
Date: 2010-06-21 18:41:48 EDT (Mon, 21 Jun 2010)
New Revision: 63212
URL: http://svn.boost.org/trac/boost/changeset/63212
Log:
completed testing for flag class
Text files modified:
sandbox/SOC/2010/bit_masks/lib/integer/test/Jamfile.v2 | 1 +
sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/flag_test.cpp | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 37 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-21 18:41:48 EDT (Mon, 21 Jun 2010)
@@ -41,5 +41,6 @@
[ compile bft_testing/compile_pass/fusion_includes.cpp ]
[ run bft_testing/fusion_iterator_testing.cpp ]
[ run bft_testing/fusion_integration_testing.cpp ]
+ [ run bft_testing/flag_test.cpp ]
;
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/flag_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/flag_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/flag_test.cpp 2010-06-21 18:41:48 EDT (Mon, 21 Jun 2010)
@@ -0,0 +1,36 @@
+// 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/assert.hpp>
+
+
+using namespace boost;
+
+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>,
+ member<int, salmon, 16>,
+ flag<blue>
+> test_tuple;
+
+
+int main() {
+ test_tuple temp;
+
+ temp.get<blue>() = false;
+ BOOST_ASSERT(( temp.get<blue>() == false));
+ 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