Update of /cvsroot/boost/boost/libs/integer/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29671/libs/integer/test
Modified Files:
Tag: RC_1_34_0
static_min_max_test.cpp static_log2_test.cpp
integer_mask_test.cpp
Log Message:
Correct testing bugs:
either changing assert(...) or BOOST_ASSERT(...) to BOOST_TEST
(in my code only)
or adding "return boost::report_errors();" where it was clearly
missing (and a pure bug, in anyone's code).
or changing BOOST_TEST to BOOST_CHECK where the integer library
was clearly using Boost.Test and not returning report_errors().
Index: static_min_max_test.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/integer/test/static_min_max_test.cpp,v
retrieving revision 1.2
retrieving revision 1.2.8.1
diff -u -d -r1.2 -r1.2.8.1
--- static_min_max_test.cpp 30 Jul 2004 04:46:56 -0000 1.2
+++ static_min_max_test.cpp 25 Feb 2007 15:28:02 -0000 1.2.8.1
@@ -11,7 +11,7 @@
// 23 Sep 2001 Initial version (Daryle Walker)
#define BOOST_INCLUDE_MAIN
-#include <boost/test/test_tools.hpp> // for main, BOOST_TEST
+#include <boost/test/test_tools.hpp> // for main, BOOST_CHECK
#include <boost/cstdlib.hpp> // for boost::exit_success
#include <boost/integer/static_min_max.hpp> // for boost::static_signed_min,
etc.
@@ -37,57 +37,57 @@
// Two positives
cout << "Doing tests with two positive values." << endl;
- BOOST_TEST( (static_signed_min< 9, 14>::value) == 9 );
- BOOST_TEST( (static_signed_max< 9, 14>::value) == 14 );
- BOOST_TEST( (static_signed_min<14, 9>::value) == 9 );
- BOOST_TEST( (static_signed_max<14, 9>::value) == 14 );
+ BOOST_CHECK( (static_signed_min< 9, 14>::value) == 9 );
+ BOOST_CHECK( (static_signed_max< 9, 14>::value) == 14 );
+ BOOST_CHECK( (static_signed_min<14, 9>::value) == 9 );
+ BOOST_CHECK( (static_signed_max<14, 9>::value) == 14 );
- BOOST_TEST( (static_unsigned_min< 9, 14>::value) == 9 );
- BOOST_TEST( (static_unsigned_max< 9, 14>::value) == 14 );
- BOOST_TEST( (static_unsigned_min<14, 9>::value) == 9 );
- BOOST_TEST( (static_unsigned_max<14, 9>::value) == 14 );
+ BOOST_CHECK( (static_unsigned_min< 9, 14>::value) == 9 );
+ BOOST_CHECK( (static_unsigned_max< 9, 14>::value) == 14 );
+ BOOST_CHECK( (static_unsigned_min<14, 9>::value) == 9 );
+ BOOST_CHECK( (static_unsigned_max<14, 9>::value) == 14 );
// Two negatives
cout << "Doing tests with two negative values." << endl;
- BOOST_TEST( (static_signed_min< -8, -101>::value) == -101 );
- BOOST_TEST( (static_signed_max< -8, -101>::value) == -8 );
- BOOST_TEST( (static_signed_min<-101, -8>::value) == -101 );
- BOOST_TEST( (static_signed_max<-101, -8>::value) == -8 );
+ BOOST_CHECK( (static_signed_min< -8, -101>::value) == -101 );
+ BOOST_CHECK( (static_signed_max< -8, -101>::value) == -8 );
+ BOOST_CHECK( (static_signed_min<-101, -8>::value) == -101 );
+ BOOST_CHECK( (static_signed_max<-101, -8>::value) == -8 );
// With zero
cout << "Doing tests with zero and a positive or negative value." << endl;
- BOOST_TEST( (static_signed_min< 0, 14>::value) == 0 );
- BOOST_TEST( (static_signed_max< 0, 14>::value) == 14 );
- BOOST_TEST( (static_signed_min<14, 0>::value) == 0 );
- BOOST_TEST( (static_signed_max<14, 0>::value) == 14 );
+ BOOST_CHECK( (static_signed_min< 0, 14>::value) == 0 );
+ BOOST_CHECK( (static_signed_max< 0, 14>::value) == 14 );
+ BOOST_CHECK( (static_signed_min<14, 0>::value) == 0 );
+ BOOST_CHECK( (static_signed_max<14, 0>::value) == 14 );
- BOOST_TEST( (static_unsigned_min< 0, 14>::value) == 0 );
- BOOST_TEST( (static_unsigned_max< 0, 14>::value) == 14 );
- BOOST_TEST( (static_unsigned_min<14, 0>::value) == 0 );
- BOOST_TEST( (static_unsigned_max<14, 0>::value) == 14 );
+ BOOST_CHECK( (static_unsigned_min< 0, 14>::value) == 0 );
+ BOOST_CHECK( (static_unsigned_max< 0, 14>::value) == 14 );
+ BOOST_CHECK( (static_unsigned_min<14, 0>::value) == 0 );
+ BOOST_CHECK( (static_unsigned_max<14, 0>::value) == 14 );
- BOOST_TEST( (static_signed_min< 0, -101>::value) == -101 );
- BOOST_TEST( (static_signed_max< 0, -101>::value) == 0 );
- BOOST_TEST( (static_signed_min<-101, 0>::value) == -101 );
- BOOST_TEST( (static_signed_max<-101, 0>::value) == 0 );
+ BOOST_CHECK( (static_signed_min< 0, -101>::value) == -101 );
+ BOOST_CHECK( (static_signed_max< 0, -101>::value) == 0 );
+ BOOST_CHECK( (static_signed_min<-101, 0>::value) == -101 );
+ BOOST_CHECK( (static_signed_max<-101, 0>::value) == 0 );
// With identical
cout << "Doing tests with two identical values." << endl;
- BOOST_TEST( (static_signed_min<0, 0>::value) == 0 );
- BOOST_TEST( (static_signed_max<0, 0>::value) == 0 );
- BOOST_TEST( (static_unsigned_min<0, 0>::value) == 0 );
- BOOST_TEST( (static_unsigned_max<0, 0>::value) == 0 );
+ BOOST_CHECK( (static_signed_min<0, 0>::value) == 0 );
+ BOOST_CHECK( (static_signed_max<0, 0>::value) == 0 );
+ BOOST_CHECK( (static_unsigned_min<0, 0>::value) == 0 );
+ BOOST_CHECK( (static_unsigned_max<0, 0>::value) == 0 );
- BOOST_TEST( (static_signed_min<14, 14>::value) == 14 );
- BOOST_TEST( (static_signed_max<14, 14>::value) == 14 );
- BOOST_TEST( (static_unsigned_min<14, 14>::value) == 14 );
- BOOST_TEST( (static_unsigned_max<14, 14>::value) == 14 );
+ BOOST_CHECK( (static_signed_min<14, 14>::value) == 14 );
+ BOOST_CHECK( (static_signed_max<14, 14>::value) == 14 );
+ BOOST_CHECK( (static_unsigned_min<14, 14>::value) == 14 );
+ BOOST_CHECK( (static_unsigned_max<14, 14>::value) == 14 );
- BOOST_TEST( (static_signed_min< -101, -101>::value) == -101 );
- BOOST_TEST( (static_signed_max< -101, -101>::value) == -101 );
+ BOOST_CHECK( (static_signed_min< -101, -101>::value) == -101 );
+ BOOST_CHECK( (static_signed_max< -101, -101>::value) == -101 );
return boost::exit_success;
}
Index: static_log2_test.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/integer/test/static_log2_test.cpp,v
retrieving revision 1.2
retrieving revision 1.2.8.1
diff -u -d -r1.2 -r1.2.8.1
--- static_log2_test.cpp 30 Jul 2004 04:46:56 -0000 1.2
+++ static_log2_test.cpp 25 Feb 2007 15:28:02 -0000 1.2.8.1
@@ -20,7 +20,7 @@
// Macros to compact code
-#define PRIVATE_LB_TEST( v, e ) BOOST_TEST( ::boost::static_log2<v>::value ==
e )
+#define PRIVATE_LB_TEST( v, e ) BOOST_CHECK( ::boost::static_log2<v>::value
== e )
#define PRIVATE_PRINT_LB( v ) ::std::cout << "boost::static_log2<" << (v) \
<< "> = " << ::boost::static_log2< (v) >::value << '.' << ::std::endl
Index: integer_mask_test.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/integer/test/integer_mask_test.cpp,v
retrieving revision 1.2
retrieving revision 1.2.8.1
diff -u -d -r1.2 -r1.2.8.1
--- integer_mask_test.cpp 30 Jul 2004 04:46:56 -0000 1.2
+++ integer_mask_test.cpp 25 Feb 2007 15:28:02 -0000 1.2.8.1
@@ -19,16 +19,16 @@
#include <iostream> // for std::cout (std::endl indirectly)
-#define PRIVATE_HIGH_BIT_SLOW_TEST(v) BOOST_TEST( ::boost::high_bit_mask_t< \
+#define PRIVATE_HIGH_BIT_SLOW_TEST(v) BOOST_CHECK( ::boost::high_bit_mask_t< \
(v) >::high_bit == (1ul << (v)) );
-#define PRIVATE_HIGH_BIT_FAST_TEST(v) BOOST_TEST( ::boost::high_bit_mask_t< \
+#define PRIVATE_HIGH_BIT_FAST_TEST(v) BOOST_CHECK( ::boost::high_bit_mask_t< \
(v) >::high_bit_fast == (1ul << (v)) );
#define PRIVATE_HIGH_BIT_TEST(v) do { PRIVATE_HIGH_BIT_SLOW_TEST(v); \
PRIVATE_HIGH_BIT_FAST_TEST(v); } while (false)
-#define PRIVATE_LOW_BITS_SLOW_TEST(v) BOOST_TEST( ::boost::low_bits_mask_t< \
+#define PRIVATE_LOW_BITS_SLOW_TEST(v) BOOST_CHECK( ::boost::low_bits_mask_t< \
(v) >::sig_bits == ((1ul << (v)) - 1) );
-#define PRIVATE_LOW_BITS_FAST_TEST(v) BOOST_TEST( ::boost::low_bits_mask_t< \
+#define PRIVATE_LOW_BITS_FAST_TEST(v) BOOST_CHECK( ::boost::low_bits_mask_t< \
(v) >::sig_bits_fast == ((1ul << (v)) - 1) );
#define PRIVATE_LOW_BITS_TEST(v) do { PRIVATE_LOW_BITS_SLOW_TEST(v); \
PRIVATE_LOW_BITS_FAST_TEST(v); } while (false)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs