|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61994 - sandbox/SOC/2010/bit_masks/lib/integer/test
From: bbartmanboost_at_[hidden]
Date: 2010-05-15 09:48:29
Author: bbartman
Date: 2010-05-15 09:48:28 EDT (Sat, 15 May 2010)
New Revision: 61994
URL: http://svn.boost.org/trac/boost/changeset/61994
Log:
completed type_list which are used for testing many different types quickly by using for_each
Text files modified:
sandbox/SOC/2010/bit_masks/lib/integer/test/low_bit_mask_test.cpp | 67 +--------------------------------------
sandbox/SOC/2010/bit_masks/lib/integer/test/test_type_list.hpp | 50 ++++++++++++++++++++++++++++-
2 files changed, 50 insertions(+), 67 deletions(-)
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/low_bit_mask_test.cpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/low_bit_mask_test.cpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/low_bit_mask_test.cpp 2010-05-15 09:48:28 EDT (Sat, 15 May 2010)
@@ -10,75 +10,12 @@
#include <boost/detail/lightweight_test.hpp> // for main, BOOST_TEST
#include <boost/assert.hpp>
#include <boost/type_traits.hpp>
+#include "test_type_list.hpp"
#include <boost/integer/high_low_bits.hpp>
using namespace boost;
-/*
-// testing additional integral types.
-char
-unsigned char
-short
-unsigned short
-long
-unsigned long
-int
-unsigned int
-long long
-unsigned long long
-
-integer types from boost integer:
-
-int_least8_t
-int_least16_t
-int_least32_t
-uint_least8_t
-uint_least16_t
-uint_least32_t
-
-
-The following types are available only if, after including <boost/cstdint.hpp>,
-the macro BOOST_NO_INT64_T is not defined:
-
-int_least64_t
-uint_least64_t
-
-The following fastest minimum-width integer types are provided for all platforms:
-
-int_fast8_t
-int_fast16_t
-int_fast32_t
-uint_fast8_t
-uint_fast16_t
-uint_fast32_t
-
-The following types are available only if, after including <boost/cstdint.hpp>,
-the macro BOOST_NO_INT64_T is not defined:
-
-int_fast64_t
-uint_fast64_t
-
-/////
-typedef low_bits<T, 3> lbits
-*/
-
-// testing type list.
-typedef boost::mpl::list<
- char,
- unsigned char,
- short,
- unsigned short,
- long,
- unsigned long,
- int,
- unsigned int
-#if 0
- ,
- long long,
- unsigned long long
-#endif
- > test_types;
template <typename T>
@@ -108,5 +45,7 @@
int main( ) {
mpl::for_each<test_types>( type_tester() );
+ mpl::for_each<test_types_2>( type_tester() );
+ mpl::for_each<test_types_3>( type_tester() );
return 0;
}
Modified: sandbox/SOC/2010/bit_masks/lib/integer/test/test_type_list.hpp
==============================================================================
--- sandbox/SOC/2010/bit_masks/lib/integer/test/test_type_list.hpp (original)
+++ sandbox/SOC/2010/bit_masks/lib/integer/test/test_type_list.hpp 2010-05-15 09:48:28 EDT (Sat, 15 May 2010)
@@ -14,6 +14,11 @@
#ifndef BOOST_BITS_AND_INTS_TESTING_TYPE_LIST_HPP
#define BOOST_BITS_AND_INTS_TESTING_TYPE_LIST_HPP
+
+// standard library includes
+#include <cstddef>
+
+// boost includes
#include <boost/cstdint.hpp>
#include <boost/mpl/list.hpp>
#include <boost/mpl/for_each.hpp>
@@ -21,7 +26,6 @@
using namespace boost;
/*
-
integer types from boost integer:
int_least8_t
@@ -70,7 +74,47 @@
#if 0
,
long long,
- unsigned long long
+ unsigned long long,
+#endif
+ > test_types;
+
+
+typedef boost::mpl::list<
+ // ____________ standard types __________________
+ // char16_t,
+ // char32_t,
+ wchar_t,
+ std::ptrdiff_t,
+ std::size_t//,
+ // std::max_align_t,
+ // std::nullptr_t,
+ > test_types_2;
+
+typedef boost::mpl::list<
+ // ____________ cstdint types __________________
+ int_least8_t,
+ int_least16_t,
+ int_least32_t,
+ uint_least8_t,
+ uint_least16_t,
+ uint_least32_t,
+#if 0
+ int_least64_t,
+ uint_least64_t,
+#endif
+ int_fast8_t,
+ int_fast16_t,
+ int_fast32_t,
+ uint_fast8_t,
+ uint_fast16_t,
+ uint_fast32_t
+#if 0
+ ,
+ int_fast64_t,
+ uint_fast64_t
#endif
- > test_types;
+ > test_types_3;
+
+
+
#endif
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