2 // Boost.Pointer Container
4 // Copyright Thorsten Ottosen 2003-2005. Use, modification and
5 // distribution is subject to the Boost Software License, Version
6 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // For more information, see http://www.boost.org/libs/ptr_container/
12 #define PTR_LIST_TEST 1
13 #define PTR_CONTAINER_DEBUG 0
15 #include <boost/test/unit_test.hpp>
16 #include "sequence_test_data.hpp"
17 #include <boost/ptr_container/ptr_list.hpp>
22 reversible_container_test
< ptr_list
<Base
>, Base
, Derived_class
>();
23 reversible_container_test
< ptr_list
<Value
>, Value
, Value
>();
24 reversible_container_test
< ptr_list
< nullable
<Base
> >, Base
, Derived_class
>();
25 reversible_container_test
< ptr_list
< nullable
<Value
> >, Value
, Value
>();
27 container_assignment_test
< ptr_list
<Base
>, ptr_list
<Derived_class
>,
29 container_assignment_test
< ptr_list
< nullable
<Base
> >,
30 ptr_list
< nullable
<Derived_class
> >,
32 container_assignment_test
< ptr_list
< nullable
<Base
> >,
33 ptr_list
<Derived_class
>,
35 container_assignment_test
< ptr_list
<Base
>,
36 ptr_list
< nullable
<Derived_class
> >,
39 test_transfer
< ptr_list
<Derived_class
>, ptr_list
<Base
>, Derived_class
>();
41 random_access_algorithms_test
< ptr_list
<int> >();
43 list
.push_back( new int(0) );
44 list
.push_back( new int(2) );
45 list
.push_back( new int(1) );
46 list
.push_front( new int(3) );
47 list
.push_front( std::auto_ptr
<int>( new int(42) ) );
53 using boost::unit_test::test_suite
;
55 test_suite
* init_unit_test_suite( int argc
, char* argv
[] )
57 test_suite
* test
= BOOST_TEST_SUITE( "Pointer Container Test Suite" );
59 test
->add( BOOST_TEST_CASE( &test_list
) );