Too many instantiations to test features. Removed some redundant ones.

This commit is contained in:
Ion Gaztañaga
2014-10-10 18:22:14 +02:00
parent d25ae5748e
commit 7e4b7286ca
10 changed files with 19 additions and 46 deletions

View File

@@ -538,9 +538,6 @@ int main()
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
test_main_template<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_main_template_bptr< true >()();
test_main_template_bptr< false >()();

View File

@@ -239,9 +239,6 @@ int main()
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
test_main_template<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_main_template_bptr< true >()();
test_main_template_bptr< false >()();

View File

@@ -8,7 +8,7 @@
//
//////////////////////////////////////////////////////////////////////////////
#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/intrusive/pointer_traits.hpp>
@@ -120,13 +120,13 @@ int main()
int dummy;
//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 ));
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 ));
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 ));
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
, double*>::value ));
if(boost::intrusive::pointer_traits<int*>::pointer_to(dummy) != &dummy){
@@ -143,13 +143,13 @@ int main()
}
//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 ));
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 ));
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 ));
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<double> >::value ));
if(boost::intrusive::pointer_traits< CompleteSmartPtr<int> >
@@ -170,13 +170,13 @@ int main()
}
//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 ));
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 ));
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 ));
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<double> >::value ));
if(boost::intrusive::pointer_traits< SimpleSmartPtr<int> >

View File

@@ -242,9 +242,6 @@ int main()
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
test_main_template<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_main_template_bptr< true >()();
test_main_template_bptr< false >()();

View File

@@ -273,7 +273,6 @@ struct Get_Preset_Container
};
};
template < bool ConstantTimeSize >
struct test_main_template_bptr
{
void operator () ()
@@ -284,8 +283,8 @@ struct test_main_template_bptr
allocator_type::init();
test::test_generic_multiset< value_traits,
Get_Preset_Container< value_traits, ConstantTimeSize,
bounded_pointer_holder< value_type > >::template GetContainer
Get_Preset_Container< value_traits, true,
bounded_pointer_holder< value_type > >::GetContainer
>::test_all();
assert(allocator_type::is_clear());
allocator_type::destroy();
@@ -297,11 +296,8 @@ int main()
// test (plain/smart pointers) x (const size) x (void node allocator)
test_main_template<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_main_template_bptr< true >()();
test_main_template_bptr< false >()();
test_main_template_bptr()();
return boost::report_errors();
}

View File

@@ -271,7 +271,6 @@ struct Get_Preset_Container
};
};
template < bool ConstantTimeSize >
struct test_main_template_bptr
{
void operator () ()
@@ -282,8 +281,8 @@ struct test_main_template_bptr
allocator_type::init();
test::test_generic_set< value_traits,
Get_Preset_Container< value_traits, ConstantTimeSize,
bounded_pointer_holder< value_type > >::template GetContainer
Get_Preset_Container< value_traits, true,
bounded_pointer_holder< value_type > >::GetContainer
>::test_all();
assert(allocator_type::is_clear());
allocator_type::destroy();
@@ -298,8 +297,7 @@ int main()
// 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_main_template_bptr< true >()();
test_main_template_bptr< false >()();
test_main_template_bptr()();
return boost::report_errors();
}

View File

@@ -271,9 +271,6 @@ int main()
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
test_main_template<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_main_template_bptr< true >()();
test_main_template_bptr< false >()();

View File

@@ -268,9 +268,6 @@ int main()
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
test_main_template<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_main_template_bptr< true >()();
test_main_template_bptr< false >()();

View File

@@ -236,9 +236,6 @@ int main()
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
test_main_template<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_main_template_bptr< true >()();
test_main_template_bptr< false >()();

View File

@@ -252,9 +252,6 @@ int main()
test_main_template<boost::intrusive::smart_ptr<void>, false, true>()();
test_main_template<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_main_template_bptr< true >()();
test_main_template_bptr< false >()();