|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r74721 - trunk/libs/ptr_container/test
From: gennadiy.rozental_at_[hidden]
Date: 2011-10-05 05:26:18
Author: rogeeff
Date: 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
New Revision: 74721
URL: http://svn.boost.org/trac/boost/changeset/74721
Log:
eliminated unit_test_framework and BOOST_MESSAGE
Text files modified:
trunk/libs/ptr_container/test/associative_test_data.hpp | 20 ++++++++++----------
trunk/libs/ptr_container/test/ptr_array.cpp | 8 ++++----
trunk/libs/ptr_container/test/ptr_circular_buffer.cpp | 14 +++++++-------
trunk/libs/ptr_container/test/ptr_container_adapter.cpp | 4 ++--
trunk/libs/ptr_container/test/ptr_map.cpp | 20 ++++++++++----------
trunk/libs/ptr_container/test/ptr_map_adapter.cpp | 4 ++--
trunk/libs/ptr_container/test/ptr_unordered_map.cpp | 20 ++++++++++----------
trunk/libs/ptr_container/test/sequence_test_data.hpp | 26 +++++++++++++-------------
trunk/libs/ptr_container/test/test_data.hpp | 10 +++++-----
9 files changed, 63 insertions(+), 63 deletions(-)
Modified: trunk/libs/ptr_container/test/associative_test_data.hpp
==============================================================================
--- trunk/libs/ptr_container/test/associative_test_data.hpp (original)
+++ trunk/libs/ptr_container/test/associative_test_data.hpp 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
@@ -55,7 +55,7 @@
{
using namespace boost;
- BOOST_MESSAGE( "starting associative container test" );
+ BOOST_TEST_MESSAGE( "starting associative container test" );
enum { max_cnt = 10, size = 100 };
C c;
BOOST_CHECK( c.size() == 0 );
@@ -67,7 +67,7 @@
C c3;
- BOOST_MESSAGE( "finished construction test" );
+ BOOST_TEST_MESSAGE( "finished construction test" );
C a_copy( c );
BOOST_CHECK_EQUAL( a_copy.size(), c.size() );
@@ -78,7 +78,7 @@
a_copy = a_copy;
BOOST_CHECK( a_copy.empty() );
- BOOST_MESSAGE( "finished copying test" );
+ BOOST_TEST_MESSAGE( "finished copying test" );
BOOST_DEDUCED_TYPENAME C::allocator_type alloc = c.get_allocator();
BOOST_DEDUCED_TYPENAME C::iterator i = c.begin();
@@ -88,7 +88,7 @@
BOOST_DEDUCED_TYPENAME C::iterator i2 = c.end();
BOOST_DEDUCED_TYPENAME C::const_iterator ci2 = c2.begin();
- BOOST_MESSAGE( "finished iterator test" );
+ BOOST_TEST_MESSAGE( "finished iterator test" );
BOOST_DEDUCED_TYPENAME C::size_type s = c.size();
BOOST_DEDUCED_TYPENAME C::size_type s2 = c.max_size();
@@ -96,7 +96,7 @@
BOOST_CHECK_EQUAL( c.size(), s );
bool b = c.empty();
hide_warning(b);
- BOOST_MESSAGE( "finished accessors test" );
+ BOOST_TEST_MESSAGE( "finished accessors test" );
T* t = new T;
c.insert( c.end(), t );
@@ -126,13 +126,13 @@
//
c3.erase( boost::make_iterator_range(c3) );
BOOST_CHECK( c3.empty() );
- BOOST_MESSAGE( "finished modifiers test" );
+ BOOST_TEST_MESSAGE( "finished modifiers test" );
c.insert( c.end(), new T );
typename C::auto_type ptr2 = c.release( c.begin() );
std::auto_ptr<C> ap2 = c.release();
c = c2.clone();
- BOOST_MESSAGE( "finished release/clone test" );
+ BOOST_TEST_MESSAGE( "finished release/clone test" );
c3.insert( new T );
c3.insert( new T );
@@ -165,12 +165,12 @@
BOOST_CHECK( c3.empty() );
#endif
- BOOST_MESSAGE( "finished transfer test" );
+ BOOST_TEST_MESSAGE( "finished transfer test" );
C c4;
c4.swap(c3);
swap(c4,c3);
- BOOST_MESSAGE( "finished set/map interface test" );
+ BOOST_TEST_MESSAGE( "finished set/map interface test" );
sub_range<C> sub;
sub_range<const C> csub;
@@ -185,7 +185,7 @@
csub = c2.equal_range( *t );
delete t;
- BOOST_MESSAGE( "finished algorithms interface test" );
+ BOOST_TEST_MESSAGE( "finished algorithms interface test" );
}
Modified: trunk/libs/ptr_container/test/ptr_array.cpp
==============================================================================
--- trunk/libs/ptr_container/test/ptr_array.cpp (original)
+++ trunk/libs/ptr_container/test/ptr_array.cpp 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
@@ -97,7 +97,7 @@
derived.replace( 1, new Derived_class );
ptr_array<Base,2> base( derived );
- BOOST_MESSAGE( "finished derived to base test" );
+ BOOST_TEST_MESSAGE( "finished derived to base test" );
base = derived;
ptr_array<Base,2> base2( base );
@@ -124,12 +124,12 @@
BOOST_DEDUCED_TYPENAME C::reverse_iterator rv2 = c.rend();
BOOST_DEDUCED_TYPENAME C::const_reverse_iterator cvr2 = c2.rend();
- BOOST_MESSAGE( "finished iterator test" );
+ BOOST_TEST_MESSAGE( "finished iterator test" );
BOOST_CHECK_EQUAL( c.empty(), false );
BOOST_CHECK_EQUAL( c.size(), c.max_size() );
- BOOST_MESSAGE( "finished capacity test" );
+ BOOST_TEST_MESSAGE( "finished capacity test" );
BOOST_CHECK_EQUAL( c.is_null(0), false );
BOOST_CHECK_EQUAL( c.is_null(1), false );
@@ -154,7 +154,7 @@
for( size_t i = 0; i < c3.size(); ++i )
BOOST_CHECK_EQUAL( c3.is_null(i), true );
- BOOST_MESSAGE( "finished element access test" );
+ BOOST_TEST_MESSAGE( "finished element access test" );
}
using boost::unit_test::test_suite;
Modified: trunk/libs/ptr_container/test/ptr_circular_buffer.cpp
==============================================================================
--- trunk/libs/ptr_container/test/ptr_circular_buffer.cpp (original)
+++ trunk/libs/ptr_container/test/ptr_circular_buffer.cpp 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
@@ -53,7 +53,7 @@
random_access_algorithms_test< ptr_circular_buffer<int> >();
- BOOST_MESSAGE( "starting ptr_circular_buffer test" );
+ BOOST_TEST_MESSAGE( "starting ptr_circular_buffer test" );
ptr_circular_buffer<int> vec( 100u );
BOOST_CHECK( vec.capacity() >= 100u );
@@ -89,7 +89,7 @@
BOOST_CHECK( vec2 <= vec );
BOOST_CHECK( vec >= vec2 );
- BOOST_MESSAGE( "push_front test" );
+ BOOST_TEST_MESSAGE( "push_front test" );
assign::push_front( vec2 )
( new int(2) )
( new int(4) )
@@ -105,7 +105,7 @@
vec2.rresize( 0 );
//vec2.reverse();
- BOOST_MESSAGE( "when full test" );
+ BOOST_TEST_MESSAGE( "when full test" );
ptr_circular_buffer<int> vec3;
BOOST_CHECK_EQUAL( vec3.capacity(), 0u );
@@ -134,7 +134,7 @@
BOOST_CHECK_EQUAL( vec3.front(), 6 );
BOOST_CHECK_EQUAL( vec3.back(), 2 );
- BOOST_MESSAGE( "transfer test" );
+ BOOST_TEST_MESSAGE( "transfer test" );
ptr_circular_buffer<int> vec4(2u);
vec4.transfer( vec4.end(), vec3 );
BOOST_CHECK_EQUAL( vec4.size(), 2u );
@@ -145,11 +145,11 @@
BOOST_CHECK_EQUAL( vec3.size(), 1u );
BOOST_CHECK_EQUAL( vec3.front(), 2 );
- BOOST_MESSAGE( "rerase test" );
+ BOOST_TEST_MESSAGE( "rerase test" );
vec.rerase( vec.begin() );
vec.rerase( boost::make_iterator_range( vec ) );
- BOOST_MESSAGE( "array test" );
+ BOOST_TEST_MESSAGE( "array test" );
const int data_size = 10;
int** array = new int*[data_size];
for( int i = 0; i != data_size; ++i )
@@ -165,7 +165,7 @@
const_array_range = const_cast< const ptr_circular_buffer<int>& >(vec).array_one();
const_array_range = const_cast< const ptr_circular_buffer<int>& >(vec).array_two();
- BOOST_MESSAGE( "finishing ptr_circular_buffer test" );
+ BOOST_TEST_MESSAGE( "finishing ptr_circular_buffer test" );
}
Modified: trunk/libs/ptr_container/test/ptr_container_adapter.cpp
==============================================================================
--- trunk/libs/ptr_container/test/ptr_container_adapter.cpp (original)
+++ trunk/libs/ptr_container/test/ptr_container_adapter.cpp 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
@@ -51,9 +51,9 @@
// algo_test_polymorphic< ptr_list<Base>, Derived_class >();
}
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
-using boost::unit_test_framework::test_suite;
+using boost::unit_test::test_suite;
test_suite* init_unit_test_suite( int argc, char* argv[] )
{
Modified: trunk/libs/ptr_container/test/ptr_map.cpp
==============================================================================
--- trunk/libs/ptr_container/test/ptr_map.cpp (original)
+++ trunk/libs/ptr_container/test/ptr_map.cpp 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
@@ -85,7 +85,7 @@
{
using namespace boost;
- BOOST_MESSAGE( "starting associative container test" );
+ BOOST_TEST_MESSAGE( "starting associative container test" );
enum { max_cnt = 10, size = 100 };
C c;
BOOST_CHECK( c.size() == 0 );
@@ -95,7 +95,7 @@
C c3;
- BOOST_MESSAGE( "finished construction test" );
+ BOOST_TEST_MESSAGE( "finished construction test" );
BOOST_DEDUCED_TYPENAME C::allocator_type alloc = c.get_allocator();
BOOST_DEDUCED_TYPENAME C::iterator i = c.begin();
@@ -109,7 +109,7 @@
BOOST_DEDUCED_TYPENAME C::key_type a_key;
- BOOST_MESSAGE( "finished iterator test" );
+ BOOST_TEST_MESSAGE( "finished iterator test" );
BOOST_DEDUCED_TYPENAME C::size_type s = c.size();
BOOST_DEDUCED_TYPENAME C::size_type s2 = c.max_size();
@@ -117,7 +117,7 @@
BOOST_CHECK_EQUAL( c.size(), s );
bool b = c.empty();
hide_warning(b);
- BOOST_MESSAGE( "finished accessors test" );
+ BOOST_TEST_MESSAGE( "finished accessors test" );
a_key = get_next_key( a_key );
c.insert( a_key, new T );
@@ -136,7 +136,7 @@
BOOST_CHECK( !c3.empty() );
c3.clear();
BOOST_CHECK( c3.empty() );
- BOOST_MESSAGE( "finished modifiers test" );
+ BOOST_TEST_MESSAGE( "finished modifiers test" );
a_key = get_next_key( a_key );
@@ -146,7 +146,7 @@
typename C::auto_type ptr2 = c.release( c.begin() );
std::auto_ptr<C> ap = c.release();
c = c2.clone();
- BOOST_MESSAGE( "finished release/clone test" );
+ BOOST_TEST_MESSAGE( "finished release/clone test" );
a_key = get_next_key( a_key );
@@ -168,12 +168,12 @@
BOOST_CHECK( c3.empty() );
c3. BOOST_NESTED_TEMPLATE transfer<C>(c);
#endif
- BOOST_MESSAGE( "finished transfer test" );
+ BOOST_TEST_MESSAGE( "finished transfer test" );
BOOST_CHECK( !c3.empty() );
c3.replace( c3.begin(), new T );
c3.replace( c3.begin(), std::auto_ptr<T>( new T ) );
- BOOST_MESSAGE( "finished set/map interface test" );
+ BOOST_TEST_MESSAGE( "finished set/map interface test" );
// @todo: make macro with algorithms so that the right erase() is called.
// c.unique();
@@ -208,7 +208,7 @@
catch( const bad_ptr_container_operation& )
{ }
- BOOST_MESSAGE( "finished algorithms interface test" );
+ BOOST_TEST_MESSAGE( "finished algorithms interface test" );
typename C::iterator it = c.begin(), e = c.end();
for( ; it != e; ++it )
@@ -235,7 +235,7 @@
// << crit.base().value() << " key = " << crit.base().key();
}
- BOOST_MESSAGE( "finished iterator test" );
+ BOOST_TEST_MESSAGE( "finished iterator test" );
a_key = get_next_key( a_key );
c.insert( a_key, new T );
Modified: trunk/libs/ptr_container/test/ptr_map_adapter.cpp
==============================================================================
--- trunk/libs/ptr_container/test/ptr_map_adapter.cpp (original)
+++ trunk/libs/ptr_container/test/ptr_map_adapter.cpp 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
@@ -61,9 +61,9 @@
}
-#include <boost/test/included/unit_test_framework.hpp>
+#include <boost/test/included/unit_test.hpp>
-using boost::unit_test_framework::test_suite;
+using boost::unit_test::test_suite;
test_suite* init_unit_test_suite( int argc, char* argv[] )
{
Modified: trunk/libs/ptr_container/test/ptr_unordered_map.cpp
==============================================================================
--- trunk/libs/ptr_container/test/ptr_unordered_map.cpp (original)
+++ trunk/libs/ptr_container/test/ptr_unordered_map.cpp 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
@@ -91,7 +91,7 @@
{
using namespace boost;
- BOOST_MESSAGE( "starting associative container test" );
+ BOOST_TEST_MESSAGE( "starting associative container test" );
enum { max_cnt = 10, size = 100 };
C c;
BOOST_CHECK( c.size() == 0 );
@@ -101,7 +101,7 @@
C c3;
- BOOST_MESSAGE( "finished construction test" );
+ BOOST_TEST_MESSAGE( "finished construction test" );
BOOST_DEDUCED_TYPENAME C::allocator_type alloc = c.get_allocator();
BOOST_DEDUCED_TYPENAME C::iterator i = c.begin();
@@ -113,7 +113,7 @@
BOOST_DEDUCED_TYPENAME C::key_type a_key;
- BOOST_MESSAGE( "finished iterator test" );
+ BOOST_TEST_MESSAGE( "finished iterator test" );
BOOST_DEDUCED_TYPENAME C::size_type s = c.size();
BOOST_DEDUCED_TYPENAME C::size_type s2 = c.max_size();
@@ -121,7 +121,7 @@
BOOST_CHECK_EQUAL( c.size(), s );
bool b = c.empty();
hide_warning(b);
- BOOST_MESSAGE( "finished accessors test" );
+ BOOST_TEST_MESSAGE( "finished accessors test" );
a_key = get_next_key( a_key );
c.insert( a_key, new T );
@@ -140,7 +140,7 @@
BOOST_CHECK( !c3.empty() );
c3.clear();
BOOST_CHECK( c3.empty() );
- BOOST_MESSAGE( "finished modifiers test" );
+ BOOST_TEST_MESSAGE( "finished modifiers test" );
a_key = get_next_key( a_key );
@@ -150,7 +150,7 @@
typename C::auto_type ptr2 = c.release( c.begin() );
std::auto_ptr<C> ap = c.release();
c = c2.clone();
- BOOST_MESSAGE( "finished release/clone test" );
+ BOOST_TEST_MESSAGE( "finished release/clone test" );
a_key = get_next_key( a_key );
@@ -172,12 +172,12 @@
BOOST_CHECK( c3.empty() );
c3. BOOST_NESTED_TEMPLATE transfer<C>(c);
#endif
- BOOST_MESSAGE( "finished transfer test" );
+ BOOST_TEST_MESSAGE( "finished transfer test" );
BOOST_CHECK( !c3.empty() );
c3.replace( c3.begin(), new T );
c3.replace( c3.begin(), std::auto_ptr<T>( new T ) );
- BOOST_MESSAGE( "finished set/map interface test" );
+ BOOST_TEST_MESSAGE( "finished set/map interface test" );
// @todo: make macro with algorithms so that the right erase() is called.
// c.unique();
@@ -208,7 +208,7 @@
catch( const bad_ptr_container_operation& )
{ }
- BOOST_MESSAGE( "finished algorithms interface test" );
+ BOOST_TEST_MESSAGE( "finished algorithms interface test" );
typename C::iterator it = c.begin(), e = c.end();
for( ; it != e; ++it )
@@ -217,7 +217,7 @@
//std::cout << "\n mapped value = " << it.value() << " key = " << it.key();
}
- BOOST_MESSAGE( "finished iterator test" );
+ BOOST_TEST_MESSAGE( "finished iterator test" );
a_key = get_next_key( a_key );
c.insert( a_key, new T );
Modified: trunk/libs/ptr_container/test/sequence_test_data.hpp
==============================================================================
--- trunk/libs/ptr_container/test/sequence_test_data.hpp (original)
+++ trunk/libs/ptr_container/test/sequence_test_data.hpp 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
@@ -24,7 +24,7 @@
{
using namespace boost;
- BOOST_MESSAGE( "starting reversible container test" );
+ BOOST_TEST_MESSAGE( "starting reversible container test" );
enum { max_cnt = 10, size = 100 };
C c;
set_capacity<C>()( c );
@@ -46,7 +46,7 @@
c.assign( c3 );
set_capacity<C>()( c );
- BOOST_MESSAGE( "finished construction test" );
+ BOOST_TEST_MESSAGE( "finished construction test" );
C a_copy( c );
BOOST_CHECK_EQUAL( a_copy.size(), c.size() );
@@ -56,7 +56,7 @@
a_copy = a_copy;
BOOST_CHECK( a_copy.empty() );
BOOST_CHECK( !c.empty() );
- BOOST_MESSAGE( "finished copying test" );
+ BOOST_TEST_MESSAGE( "finished copying test" );
BOOST_DEDUCED_TYPENAME C::allocator_type alloc = c.get_allocator();
hide_warning(alloc);
@@ -75,7 +75,7 @@
BOOST_CHECK_EQUAL( std::distance( c.rbegin(), c.rend() ),
std::distance( c.begin(), c.end() ) );
- BOOST_MESSAGE( "finished iterator test" );
+ BOOST_TEST_MESSAGE( "finished iterator test" );
BOOST_DEDUCED_TYPENAME C::size_type s = c.size();
hide_warning(s);
@@ -95,7 +95,7 @@
hide_warning(r2);
BOOST_DEDUCED_TYPENAME C::const_reference cr2 = c2.back();
hide_warning(cr2);
- BOOST_MESSAGE( "finished accessors test" );
+ BOOST_TEST_MESSAGE( "finished accessors test" );
c.push_back( new T );
BOOST_CHECK_EQUAL( c.size(), 4u );
@@ -127,7 +127,7 @@
#else
swap(c4,c3);
#endif
- BOOST_MESSAGE( "finished modifiers test" );
+ BOOST_TEST_MESSAGE( "finished modifiers test" );
c.push_back( new T ); c.push_back( new T ); c.push_back( new T );
typedef BOOST_DEDUCED_TYPENAME C::auto_type auto_type;
@@ -141,7 +141,7 @@
BOOST_CHECK( !c.empty() );
auto_type ptr2 = c.replace( c.begin(), new T );
ptr2 = c.replace( c.begin(), std::auto_ptr<T>( new T ) );
- BOOST_MESSAGE( "finished release/clone/replace test" );
+ BOOST_TEST_MESSAGE( "finished release/clone/replace test" );
c3.push_back( new T );
c3.push_back( new T );
@@ -157,7 +157,7 @@
c3. BOOST_NESTED_TEMPLATE transfer<C>( c3.begin(), c );
BOOST_CHECK( !c3.empty() );
BOOST_CHECK( c.empty() );
- BOOST_MESSAGE( "finished transfer test" );
+ BOOST_TEST_MESSAGE( "finished transfer test" );
c3.resize( 0u );
BOOST_CHECK( c3.empty() );
@@ -165,7 +165,7 @@
BOOST_CHECK_EQUAL( c3.size(), 10u );
c3.resize( 12u, &*c3.begin() );
BOOST_CHECK_EQUAL( c3.size(), 12u );
- BOOST_MESSAGE( "finished resize test" );
+ BOOST_TEST_MESSAGE( "finished resize test" );
}
@@ -174,7 +174,7 @@
template< class CDerived, class CBase, class T >
void test_transfer()
{
- BOOST_MESSAGE( "starting transfer test" );
+ BOOST_TEST_MESSAGE( "starting transfer test" );
CDerived from;
CBase to;
@@ -184,7 +184,7 @@
from.push_back( new T );
from.push_back( new T );
to. BOOST_NESTED_TEMPLATE transfer<CDerived>( to.end(), from );
- BOOST_MESSAGE( "finished transfer test" );
+ BOOST_TEST_MESSAGE( "finished transfer test" );
}
@@ -236,7 +236,7 @@
template< class IntContainer >
void random_access_algorithms_test()
{
- BOOST_MESSAGE( "starting random accessors algorithms test" );
+ BOOST_TEST_MESSAGE( "starting random accessors algorithms test" );
IntContainer c;
set_capacity<IntContainer>()( c );
@@ -296,6 +296,6 @@
BOOST_CHECK( c2.empty() );
BOOST_CHECK( c.size() == 9u );
BOOST_CHECK( is_sorted< std::less_equal<int> >( c ) );
- BOOST_MESSAGE( "finished random accessors algorithms test" );
+ BOOST_TEST_MESSAGE( "finished random accessors algorithms test" );
}
Modified: trunk/libs/ptr_container/test/test_data.hpp
==============================================================================
--- trunk/libs/ptr_container/test/test_data.hpp (original)
+++ trunk/libs/ptr_container/test/test_data.hpp 2011-10-05 05:26:17 EDT (Wed, 05 Oct 2011)
@@ -12,7 +12,7 @@
#include <boost/static_assert.hpp>
#include <boost/type_traits.hpp>
#include <boost/config.hpp>
-#include <boost/test/test_tools.hpp>
+#include <boost/test/unit_test.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/functional/hash.hpp>
#include <algorithm>
@@ -298,11 +298,11 @@
template< class Cont1, class Cont2 >
void transfer_test( Cont1& from, Cont2& to )
{
- BOOST_MESSAGE( "starting container transfer test" );
+ BOOST_TEST_MESSAGE( "starting container transfer test" );
BOOST_CHECK( !from.empty() );
to. BOOST_NESTED_TEMPLATE transfer<Cont1>( from );
BOOST_CHECK( !to.empty() );
- BOOST_MESSAGE( "finishing container transfer test" );
+ BOOST_TEST_MESSAGE( "finishing container transfer test" );
}
@@ -313,7 +313,7 @@
template< class BaseContainer, class DerivedContainer, class Derived >
void container_assignment_test()
{
- BOOST_MESSAGE( "starting container assignment test" );
+ BOOST_TEST_MESSAGE( "starting container assignment test" );
DerivedContainer derived;
set_capacity<DerivedContainer>()( derived );
@@ -331,7 +331,7 @@
BOOST_CHECK_EQUAL( base2.size(), base.size() );
base = base;
- BOOST_MESSAGE( "finished container assignment test" );
+ BOOST_TEST_MESSAGE( "finished container assignment test" );
}
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