|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61990 - sandbox/SOC/2010/bit_masks/lib/integer/test
From: bbartmanboost_at_[hidden]
Date: 2010-05-15 09:04:28
Author: bbartman
Date: 2010-05-15 09:04:28 EDT (Sat, 15 May 2010)
New Revision: 61990
URL: http://svn.boost.org/trac/boost/changeset/61990
Log:
Unable to get boost test working at the moment I'll come back to it later on.
Text files modified:
sandbox/SOC/2010/bit_masks/lib/integer/test/low_bit_mask_test.cpp | 29 ++++++++++++-----------------
1 files changed, 12 insertions(+), 17 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:04:28 EDT (Sat, 15 May 2010)
@@ -1,16 +1,10 @@
-#include <boost/cstdint.hpp>
-
-// #define BOOST_TEST_MODULE S
-// #include <boost/test/unit_test.hpp>
-// #include <boost/test/test_case_template.hpp>
-#include <boost/test/minimal.hpp>
#include <boost/mpl/list.hpp>
#include <boost/mpl/for_each.hpp>
-// #include <boost/test/execution_monitor.hpp>
-// #include <boost/assert.hpp>
+
+#include <boost/assert.hpp>
#include <boost/type_traits.hpp>
#include <boost/integer/high_low_bits.hpp>
@@ -90,31 +84,32 @@
-BOOST_TEST_CASE_TEMPLATE_FUNCTION( test_function, T ) {
+template <typename T>
+void test_function() {
+
// making sure that the value type is transfered correctly.
- BOOST_TEST( (is_same< typename low_bits<T, 3>::value_type, T >::value) );
+ BOOST_ASSERT((is_same< typename low_bits<T, 3>::value_type, T >::value));
// assert that mask is correct.
// T r = typename ;
- BOOST_TEST( boost::low_bits<T,3>::value );
+ BOOST_ASSERT(( boost::low_bits<T,3>::value ));
// assert that type returns the correct typedef.
- BOOST_TEST( is_same< typename low_bits<T, 3>::type, low_bits<T, 3> >::value );
+ BOOST_ASSERT(( is_same< typename low_bits<T, 3>::type, low_bits<T, 3> >::value ));
}
// basic typedef
// typedef low_bits<unsigned int, 3> lbits;
-struct value_printer {
+struct type_tester {
template< typename U >
void operator()(U) {
- // test_function<U>();
+ test_function<U>();
}
};
-int test_main(int argc, char** argv) {
- // test_function<int>();
- // mpl::for_each<test_types>( value_printer() );
+int main( ) {
+ mpl::for_each<test_types>( type_tester() );
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