mirror of
https://github.com/boostorg/intrusive.git
synced 2025-10-04 12:20:56 +02:00
Too many instantiations to test features. Removed some redundant ones.
This commit is contained in:
@@ -538,9 +538,6 @@ int main()
|
|||||||
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
||||||
test_main_template<void*, true, true>()();
|
test_main_template<void*, true, true>()();
|
||||||
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
||||||
// test (plain pointers) x (nonconst/const size) x (standard node allocator)
|
|
||||||
test_main_template<void*, false, false>()();
|
|
||||||
test_main_template<void*, true, false>()();
|
|
||||||
// test (bounded pointers) x ((nonconst/const size) x (special node allocator)
|
// test (bounded pointers) x ((nonconst/const size) x (special node allocator)
|
||||||
test_main_template_bptr< true >()();
|
test_main_template_bptr< true >()();
|
||||||
test_main_template_bptr< false >()();
|
test_main_template_bptr< false >()();
|
||||||
|
@@ -239,9 +239,6 @@ int main()
|
|||||||
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
||||||
test_main_template<void*, true, true>()();
|
test_main_template<void*, true, true>()();
|
||||||
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
||||||
// test (plain pointers) x (nonconst/const size) x (standard node allocator)
|
|
||||||
test_main_template<void*, false, false>()();
|
|
||||||
test_main_template<void*, true, false>()();
|
|
||||||
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
||||||
test_main_template_bptr< true >()();
|
test_main_template_bptr< true >()();
|
||||||
test_main_template_bptr< false >()();
|
test_main_template_bptr< false >()();
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
#include <boost/intrusive/detail/config_begin.hpp>
|
#include <boost/intrusive/detail/config_begin.hpp>
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <boost/intrusive/detail/mpl.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
#include <boost/intrusive/pointer_traits.hpp>
|
#include <boost/intrusive/pointer_traits.hpp>
|
||||||
|
|
||||||
@@ -120,13 +120,13 @@ int main()
|
|||||||
int dummy;
|
int dummy;
|
||||||
|
|
||||||
//Raw pointer
|
//Raw pointer
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
<int*>::element_type, int>::value ));
|
<int*>::element_type, int>::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
<int*>::pointer, int*>::value ));
|
<int*>::pointer, int*>::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
<int*>::difference_type, std::ptrdiff_t>::value ));
|
<int*>::difference_type, std::ptrdiff_t>::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
<int*>::rebind_pointer<double>::type
|
<int*>::rebind_pointer<double>::type
|
||||||
, double*>::value ));
|
, double*>::value ));
|
||||||
if(boost::intrusive::pointer_traits<int*>::pointer_to(dummy) != &dummy){
|
if(boost::intrusive::pointer_traits<int*>::pointer_to(dummy) != &dummy){
|
||||||
@@ -143,13 +143,13 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Complete smart pointer
|
//Complete smart pointer
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
< CompleteSmartPtr<int> >::element_type, int>::value ));
|
< CompleteSmartPtr<int> >::element_type, int>::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
< CompleteSmartPtr<int> >::pointer, CompleteSmartPtr<int> >::value ));
|
< CompleteSmartPtr<int> >::pointer, CompleteSmartPtr<int> >::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
< CompleteSmartPtr<int> >::difference_type, char>::value ));
|
< CompleteSmartPtr<int> >::difference_type, char>::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
< CompleteSmartPtr<int> >::rebind_pointer<double>::type
|
< CompleteSmartPtr<int> >::rebind_pointer<double>::type
|
||||||
, CompleteSmartPtr<double> >::value ));
|
, CompleteSmartPtr<double> >::value ));
|
||||||
if(boost::intrusive::pointer_traits< CompleteSmartPtr<int> >
|
if(boost::intrusive::pointer_traits< CompleteSmartPtr<int> >
|
||||||
@@ -170,13 +170,13 @@ int main()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Simple smart pointer
|
//Simple smart pointer
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
< SimpleSmartPtr<int> >::element_type, int>::value ));
|
< SimpleSmartPtr<int> >::element_type, int>::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
< SimpleSmartPtr<int> >::pointer, SimpleSmartPtr<int> >::value ));
|
< SimpleSmartPtr<int> >::pointer, SimpleSmartPtr<int> >::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
< SimpleSmartPtr<int> >::difference_type, std::ptrdiff_t>::value ));
|
< SimpleSmartPtr<int> >::difference_type, std::ptrdiff_t>::value ));
|
||||||
BOOST_STATIC_ASSERT(( boost::is_same<boost::intrusive::pointer_traits
|
BOOST_STATIC_ASSERT(( boost::intrusive::detail::is_same<boost::intrusive::pointer_traits
|
||||||
< SimpleSmartPtr<int> >::rebind_pointer<double>::type
|
< SimpleSmartPtr<int> >::rebind_pointer<double>::type
|
||||||
, SimpleSmartPtr<double> >::value ));
|
, SimpleSmartPtr<double> >::value ));
|
||||||
if(boost::intrusive::pointer_traits< SimpleSmartPtr<int> >
|
if(boost::intrusive::pointer_traits< SimpleSmartPtr<int> >
|
||||||
|
@@ -242,9 +242,6 @@ int main()
|
|||||||
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
||||||
test_main_template<void*, true, true>()();
|
test_main_template<void*, true, true>()();
|
||||||
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
||||||
//test (plain pointers) x (nonconst/const size) x (standard node allocator)
|
|
||||||
test_main_template<void*, false, false>()();
|
|
||||||
test_main_template<void*, true, false>()();
|
|
||||||
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
||||||
test_main_template_bptr< true >()();
|
test_main_template_bptr< true >()();
|
||||||
test_main_template_bptr< false >()();
|
test_main_template_bptr< false >()();
|
||||||
|
@@ -273,7 +273,6 @@ struct Get_Preset_Container
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
template < bool ConstantTimeSize >
|
|
||||||
struct test_main_template_bptr
|
struct test_main_template_bptr
|
||||||
{
|
{
|
||||||
void operator () ()
|
void operator () ()
|
||||||
@@ -284,8 +283,8 @@ struct test_main_template_bptr
|
|||||||
|
|
||||||
allocator_type::init();
|
allocator_type::init();
|
||||||
test::test_generic_multiset< value_traits,
|
test::test_generic_multiset< value_traits,
|
||||||
Get_Preset_Container< value_traits, ConstantTimeSize,
|
Get_Preset_Container< value_traits, true,
|
||||||
bounded_pointer_holder< value_type > >::template GetContainer
|
bounded_pointer_holder< value_type > >::GetContainer
|
||||||
>::test_all();
|
>::test_all();
|
||||||
assert(allocator_type::is_clear());
|
assert(allocator_type::is_clear());
|
||||||
allocator_type::destroy();
|
allocator_type::destroy();
|
||||||
@@ -297,11 +296,8 @@ int main()
|
|||||||
// test (plain/smart pointers) x (const size) x (void node allocator)
|
// test (plain/smart pointers) x (const size) x (void node allocator)
|
||||||
test_main_template<void*, true>()();
|
test_main_template<void*, true>()();
|
||||||
test_main_template<boost::intrusive::smart_ptr<void>, true >()();
|
test_main_template<boost::intrusive::smart_ptr<void>, true >()();
|
||||||
// test (plain pointers) x (const size) x (standard node allocator)
|
|
||||||
test_main_template<void*, false>()();
|
|
||||||
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
||||||
test_main_template_bptr< true >()();
|
test_main_template_bptr()();
|
||||||
test_main_template_bptr< false >()();
|
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
@@ -271,7 +271,6 @@ struct Get_Preset_Container
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
template < bool ConstantTimeSize >
|
|
||||||
struct test_main_template_bptr
|
struct test_main_template_bptr
|
||||||
{
|
{
|
||||||
void operator () ()
|
void operator () ()
|
||||||
@@ -282,8 +281,8 @@ struct test_main_template_bptr
|
|||||||
|
|
||||||
allocator_type::init();
|
allocator_type::init();
|
||||||
test::test_generic_set< value_traits,
|
test::test_generic_set< value_traits,
|
||||||
Get_Preset_Container< value_traits, ConstantTimeSize,
|
Get_Preset_Container< value_traits, true,
|
||||||
bounded_pointer_holder< value_type > >::template GetContainer
|
bounded_pointer_holder< value_type > >::GetContainer
|
||||||
>::test_all();
|
>::test_all();
|
||||||
assert(allocator_type::is_clear());
|
assert(allocator_type::is_clear());
|
||||||
allocator_type::destroy();
|
allocator_type::destroy();
|
||||||
@@ -298,8 +297,7 @@ int main()
|
|||||||
// test (plain pointers) x (const size) x (standard node allocator)
|
// test (plain pointers) x (const size) x (standard node allocator)
|
||||||
test_main_template<void*, false>()();
|
test_main_template<void*, false>()();
|
||||||
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
||||||
test_main_template_bptr< true >()();
|
test_main_template_bptr()();
|
||||||
test_main_template_bptr< false >()();
|
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
@@ -271,9 +271,6 @@ int main()
|
|||||||
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
||||||
test_main_template<void*, true, true>()();
|
test_main_template<void*, true, true>()();
|
||||||
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
||||||
// test (plain pointers) x (nonconst/const size) x (standard node allocator)
|
|
||||||
test_main_template<void*, false, false>()();
|
|
||||||
test_main_template<void*, true, false>()();
|
|
||||||
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
||||||
test_main_template_bptr< true >()();
|
test_main_template_bptr< true >()();
|
||||||
test_main_template_bptr< false >()();
|
test_main_template_bptr< false >()();
|
||||||
|
@@ -268,9 +268,6 @@ int main()
|
|||||||
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
||||||
test_main_template<void*, true, true>()();
|
test_main_template<void*, true, true>()();
|
||||||
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
||||||
// test (plain pointers) x (nonconst/const size) x (standard node allocator)
|
|
||||||
test_main_template<void*, false, false>()();
|
|
||||||
test_main_template<void*, true, false>()();
|
|
||||||
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
||||||
test_main_template_bptr< true >()();
|
test_main_template_bptr< true >()();
|
||||||
test_main_template_bptr< false >()();
|
test_main_template_bptr< false >()();
|
||||||
|
@@ -236,9 +236,6 @@ int main()
|
|||||||
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
||||||
test_main_template<void*, true, true>()();
|
test_main_template<void*, true, true>()();
|
||||||
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
||||||
// test (plain pointers) x (nonconst/const size) x (standard node allocator)
|
|
||||||
test_main_template<void*, false, false>()();
|
|
||||||
test_main_template<void*, true, false>()();
|
|
||||||
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
||||||
test_main_template_bptr< true >()();
|
test_main_template_bptr< true >()();
|
||||||
test_main_template_bptr< false >()();
|
test_main_template_bptr< false >()();
|
||||||
|
@@ -252,9 +252,6 @@ int main()
|
|||||||
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
|
||||||
test_main_template<void*, true, true>()();
|
test_main_template<void*, true, true>()();
|
||||||
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
test_main_template<boost::intrusive::smart_ptr<void>, true, true>()();
|
||||||
// test (plain pointers) x (nonconst/const size) x (standard node allocator)
|
|
||||||
test_main_template<void*, false, false>()();
|
|
||||||
test_main_template<void*, true, false>()();
|
|
||||||
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
// test (bounded pointers) x (nonconst/const size) x (special node allocator)
|
||||||
test_main_template_bptr< true >()();
|
test_main_template_bptr< true >()();
|
||||||
test_main_template_bptr< false >()();
|
test_main_template_bptr< false >()();
|
||||||
|
Reference in New Issue
Block a user