|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r64401 - in sandbox/SOC/2010/bit_masks: . lib/integer/test/bft_testing
From: bbartmanboost_at_[hidden]
Date: 2010-07-27 17:07:20
Author: bbartman
Date: 2010-07-27 17:07:19 EDT (Tue, 27 Jul 2010)
New Revision: 64401
URL: http://svn.boost.org/trac/boost/changeset/64401
Log:
completed updates for my bitfield_tuple test suite
Text files modified:
sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_integration_testing.cpp | 25 +++++++++++++------------
sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_iterator_testing.cpp | 25 +++++++------------------
sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/get_interface_test.cpp | 22 +++++++++++-----------
sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/make_bft_testing.cpp | 14 +++++++-------
sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/name_accessor_test.cpp | 8 ++++----
sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/padding_test.cpp | 6 +++---
sandbox/SOC/2010/bit_masks/notes.txt | 34 +++++-----------------------------
7 files changed, 50 insertions(+), 84 deletions(-)
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_integration_testing.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_integration_testing.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_integration_testing.cpp 2010-07-27 17:07:19 EDT (Tue, 27 Jul 2010)
@@ -5,9 +5,9 @@
#include <boost/integer/bitfield_tuple.hpp>
-#include <boost/assert.hpp>
+#include <boost/detail/lightweight_test.hpp>
#include <boost/mpl/assert.hpp>
-#include <boost/integer/detail/fusion_ext_includes.hpp>
+
using namespace boost;
using namespace boost::bitfields;
@@ -39,17 +39,17 @@
{
test_tuple temp;
temp.get<green>() =3 ;
- BOOST_ASSERT((fusion::at_c<1>(temp) == 3));
+ BOOST_TEST(( fusion::at_c<1>(temp) == 3 ));
}
// is_sequence testing
{
- BOOST_ASSERT(( fusion::traits::is_sequence<test_tuple>() ));
+ BOOST_TEST(( fusion::traits::is_sequence<test_tuple>() ));
}
// is_view testing
{
- BOOST_ASSERT(( !fusion::traits::is_view<test_tuple>() ));
+ BOOST_TEST(( !fusion::traits::is_view<test_tuple>() ));
}
// category_of testing
@@ -68,32 +68,33 @@
{
test_tuple temp;
temp.get<red>() = 4;
- BOOST_ASSERT(( fusion::deref(fusion::begin(temp)) == 4));
+ BOOST_TEST(( fusion::deref(fusion::begin(temp)) == 4));
}
// size testing
{
test_tuple temp;
- BOOST_ASSERT(( fusion::size(temp) == 3 ));
+ BOOST_TEST(( fusion::size(temp) == 3 ));
}
// end testing
{
test_tuple temp;
temp.get<salmon>() = 3;
- BOOST_ASSERT(( fusion::deref(fusion::prior(fusion::end(temp))) == 3 ));
+ BOOST_TEST(( fusion::deref(fusion::prior(fusion::end(temp))) == 3 ));
}
// at_key testing
{
test_tuple temp;
temp.get<salmon>() = 3;
- BOOST_ASSERT(( fusion::at_key<salmon>( temp ) == 3));
+ BOOST_TEST(( fusion::at_key<salmon>( temp ) == 3));
fusion::at_key<salmon>(temp) = 4;
- BOOST_ASSERT(( fusion::at_key<salmon>( temp ) == 4));
- BOOST_ASSERT(( temp.get<salmon>() == 4));
- BOOST_ASSERT(( fusion::at_key<green>( temp ) == 0));
+ BOOST_TEST(( fusion::at_key<salmon>( temp ) == 4));
+ BOOST_TEST(( temp.get<salmon>() == 4));
+ BOOST_TEST(( fusion::at_key<green>( temp ) == 0));
}
+ return boost::report_errors();
}
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_iterator_testing.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_iterator_testing.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/fusion_iterator_testing.cpp 2010-07-27 17:07:19 EDT (Tue, 27 Jul 2010)
@@ -5,9 +5,9 @@
#include <boost/integer/bitfield_tuple.hpp>
-#include <boost/assert.hpp>
+#include <boost/detail/lightweight_test.hpp>
#include <boost/mpl/assert.hpp>
-#include <boost/integer/detail/fusion_ext_includes.hpp>
+
using namespace boost;
using namespace boost::bitfields;
@@ -42,7 +42,7 @@
test_tuple temp;
temp.get<red>() = 3;
Iter it(temp);
- BOOST_ASSERT(( fusion::deref(it) == 3 ));
+ BOOST_TEST(( fusion::deref(it) == 3 ));
}
// iterator next
@@ -51,7 +51,7 @@
test_tuple temp;
temp.get<green>() = 3;
Iter it(temp);
- BOOST_ASSERT(( fusion::deref(fusion::next(it)) == 3 ));
+ BOOST_TEST(( fusion::deref(fusion::next(it)) == 3 ));
}
// prior
@@ -61,7 +61,7 @@
temp.get<red>() = 2;
temp.get<green>() = 3;
Iter it(temp);
- BOOST_ASSERT(( fusion::deref(fusion::prior(fusion::next(it))) == 2 ));
+ BOOST_TEST(( fusion::deref(fusion::prior(fusion::next(it))) == 2 ));
}
// distance tesing
@@ -73,7 +73,7 @@
temp.get<green>() = 3;
Iter1 it1(temp);
Iter2 it2(temp);
- BOOST_ASSERT(( fusion::distance(it2,it1) == 1 ));
+ BOOST_TEST(( fusion::distance(it2,it1) == 1 ));
}
// key_of testing
@@ -101,18 +101,7 @@
test_tuple temp;
BOOST_MPL_ASSERT((is_same<value_of_data_t::return_type,unsigned char>));
}
-
- // deref_data testing
- {
- typedef bitfield_tuple_iterator<test_tuple,1> Iter;
- typedef fusion::result_of::deref_data<
- Iter
- >::type deref_data_t;
-
- // test_tuple temp;
- // BOOST_MPL_ASSERT((is_same<deref_data_t::return_type,unsigned char>));
- }
-
+ return boost::report_errors();
}
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/get_interface_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/get_interface_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/get_interface_test.cpp 2010-07-27 17:07:19 EDT (Tue, 27 Jul 2010)
@@ -5,7 +5,7 @@
#include <boost/integer/bitfield_tuple.hpp>
-#include <boost/assert.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
@@ -32,11 +32,11 @@
test_1.get<green>() = 15;
test_1.get<red>() = 3;
test_1.get<salmon>() = 6;
- BOOST_ASSERT((test_1.get<green>() == 15));
- BOOST_ASSERT((test_1.get<red>() == 3));
- BOOST_ASSERT(( test_1.get<salmon>() == 6));
+ BOOST_TEST((test_1.get<green>() == 15));
+ BOOST_TEST((test_1.get<red>() == 3));
+ BOOST_TEST(( test_1.get<salmon>() == 6));
- BOOST_ASSERT((
+ BOOST_TEST((
const_cast<
test_tuple const&
>(test_1).get<salmon>() == 6
@@ -49,11 +49,11 @@
test_2.get<0>() = 3;
test_2.get<1>() = 14;
test_2.get<2>() = 6;
- BOOST_ASSERT((test_2.get<0>() == 3));
- BOOST_ASSERT((test_2.get<1>() == 14));
- BOOST_ASSERT((test_2.get<2>() == 6));
+ BOOST_TEST((test_2.get<0>() == 3));
+ BOOST_TEST((test_2.get<1>() == 14));
+ BOOST_TEST((test_2.get<2>() == 6));
- BOOST_ASSERT((
+ BOOST_TEST((
const_cast<
test_tuple const&
>(test_2).get<2>() == 6
@@ -64,9 +64,9 @@
{
test_tuple test_3;
test_3.get<0>() = -1;
- BOOST_ASSERT(( test_3.get<0>() == -1 ));
+ BOOST_TEST(( test_3.get<0>() == -1 ));
}
- return 0;
+ return boost::report_errors();
}
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/make_bft_testing.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/make_bft_testing.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/make_bft_testing.cpp 2010-07-27 17:07:19 EDT (Tue, 27 Jul 2010)
@@ -5,8 +5,8 @@
#include <boost/integer/bitfield_tuple.hpp>
-#include <boost/assert.hpp>
-#include <iostream>
+#include <boost/detail/lightweight_test.hpp>
+
using namespace boost;
using namespace boost::bitfields;
@@ -29,12 +29,12 @@
int main() {
{
test_tuple bft = make_bitfield_tuple<test_tuple>(1,2,4,true);
- BOOST_ASSERT(( bft.get<red>() == 1 ));
- BOOST_ASSERT(( bft.get<green>() == 2 ));
- BOOST_ASSERT(( bft.get<salmon>() == 4 ));
- BOOST_ASSERT(( bft.get<blue>() ));
+ BOOST_TEST(( bft.get<red>() == 1 ));
+ BOOST_TEST(( bft.get<green>() == 2 ));
+ BOOST_TEST(( bft.get<salmon>() == 4 ));
+ BOOST_TEST(( bft.get<blue>() ));
}
- return 0;
+ return boost::report_errors();
}
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/name_accessor_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/name_accessor_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/name_accessor_test.cpp 2010-07-27 17:07:19 EDT (Tue, 27 Jul 2010)
@@ -5,7 +5,7 @@
#include <boost/integer/bitfield_tuple.hpp>
-#include <boost/assert.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
@@ -40,13 +40,13 @@
>
>::type temp_located;
- BOOST_MPL_ASSERT_NOT((
+ BOOST_TEST((!
is_same<
temp_located,
mpl::end<
test_vect
>::type
- >
+ >::type::value
));
- return 0;
+ return boost::report_errors();
}
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/padding_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/padding_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/bft_testing/padding_test.cpp 2010-07-27 17:07:19 EDT (Tue, 27 Jul 2010)
@@ -5,7 +5,7 @@
#include <boost/integer/bitfield_tuple.hpp>
-#include <boost/assert.hpp>
+#include <boost/detail/lightweight_test.hpp>
using namespace boost;
@@ -34,8 +34,8 @@
+
mpl::at_c<test_tuple::members, 1>::type::field_width::value);
- BOOST_ASSERT(( temp == 3 ));
- return 0;
+ BOOST_TEST(( temp == 3 ));
+ 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-27 17:07:19 EDT (Tue, 27 Jul 2010)
@@ -14,21 +14,15 @@
1) template_expansion_macros.hpp
2) reference_builder.hpp
3) proxy_reference_policy.hpp
-
4) pointer_parsing_meta_functions.hpp
-
5) pointer_packing_policy.hpp
6) name_lookup.hpp
7) make_bitfield_tuple.hpp
8) bitfield_tuple_impl.hpp
9) bitfield_element.hpp
10) arg_parse_impl.hpp
-
12) bitfield_iterator.hpp - Fusion Extension
-
-
14) bitfield_tuple.hpp
-15) Remove old pointer plus bits stuff
16) interface_meta_functions.hpp
@@ -47,46 +41,25 @@
4) reference_builder_test.cpp
- b) Change to using the <boost/detail/lightweight_test.hpp> framework.
-
*) interface_meta_function_test.cpp
-
5) pointer_parsing_meta_function_test.cpp
-
6) pointer_member_test.cpp
- a) .
- b) This test is incomplete because the implementation isn't completed yet.
- c) I need a macro which will tell me if the test is 32 bit or 64 bit
- Currently the _LP64 should only work for GCC however I need a more
- universal one.
-
7) name_accessor_test.cpp
- a) .
- b) Change to using the <boost/detail/lightweight_test.hpp> framework.
-
-8) make_bft_testing.cpp
- a) .
- b) Change to using the <boost/detail/lightweight_test.hpp> framework.
9) make_bft_testing.cpp
- a) .
b) Change to using the <boost/detail/lightweight_test.hpp> framework.
c) This may need additional test to make sure that the macros are correctly
generating the code for the correct number of valid parameters.
10) get_interface_test.cpp
- a) .
- b) Change to using the <boost/detail/lightweight_test.hpp> framework.
c) Need to do more const interface testing.
11) fusion_iterator_testing.cpp
- a) remove testing from name.
- b) Change to using the <boost/detail/lightweight_test.hpp> framework.
c) Not sure just how I should test the iterator. This may be good as it
however that doesn't mean that it should just stay as is. Look into
other fusion iterator tests.
-*) bitfield_iterator.hpp
- - Make sure that this works in const situation.
+ *) bitfield_iterator.hpp
+ - Make sure that this works in const situation.
12) fusion_integration_testing.cpp
a) remove testing from name.
@@ -187,3 +160,6 @@
good currently.
--------------------------------------------------------------------------------
+
+
+ return boost::report_errors();
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