forked from boostorg/intrusive
tests: bounded pointers tests for slist, list, (rb/avl) x (set/multiset)
This commit is contained in:
+19
-17
@@ -62,8 +62,8 @@ struct hooks
|
||||
};
|
||||
|
||||
// container generator with void node allocator
|
||||
template < bool Void_Allocator >
|
||||
struct GetContainer_With_Allocator
|
||||
template < bool Default_Holder >
|
||||
struct GetContainer_With_Holder
|
||||
{
|
||||
template< class ValueType
|
||||
, class Option1 =void
|
||||
@@ -83,7 +83,7 @@ struct GetContainer
|
||||
|
||||
// container generator with standard (non-void) node allocator
|
||||
template <>
|
||||
struct GetContainer_With_Allocator< false >
|
||||
struct GetContainer_With_Holder< false >
|
||||
{
|
||||
template< class ValueType
|
||||
, class Option1 =void
|
||||
@@ -102,13 +102,13 @@ struct GetContainer
|
||||
, Option1
|
||||
, Option2
|
||||
, Option3
|
||||
, node_allocator_type< std::allocator< node > >
|
||||
, header_holder_type< pointer_holder< node > >
|
||||
> type;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
template<class VoidPointer, bool constant_time_size, bool Void_Allocator>
|
||||
template<class VoidPointer, bool constant_time_size, bool Default_Holder>
|
||||
class test_main_template
|
||||
{
|
||||
public:
|
||||
@@ -121,7 +121,7 @@ class test_main_template
|
||||
< value_type
|
||||
, typename hooks<VoidPointer>::base_hook_type
|
||||
>::type
|
||||
, GetContainer_With_Allocator< Void_Allocator >::template GetContainer
|
||||
, GetContainer_With_Holder< Default_Holder >::template GetContainer
|
||||
>::test_all();
|
||||
test::test_generic_set < typename detail::get_member_value_traits
|
||||
< value_type
|
||||
@@ -130,21 +130,21 @@ class test_main_template
|
||||
, &value_type::node_
|
||||
>
|
||||
>::type
|
||||
, GetContainer_With_Allocator< Void_Allocator >::template GetContainer
|
||||
, GetContainer_With_Holder< Default_Holder >::template GetContainer
|
||||
>::test_all();
|
||||
test::test_generic_set < nonhook_node_member_value_traits< value_type,
|
||||
typename hooks<VoidPointer>::nonhook_node_member_type,
|
||||
&value_type::nhn_member_,
|
||||
safe_link
|
||||
>,
|
||||
GetContainer_With_Allocator< Void_Allocator >::template GetContainer
|
||||
GetContainer_With_Holder< Default_Holder >::template GetContainer
|
||||
>::test_all();
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
template<class VoidPointer, bool Void_Allocator>
|
||||
class test_main_template<VoidPointer, false, Void_Allocator>
|
||||
template<class VoidPointer, bool Default_Holder>
|
||||
class test_main_template<VoidPointer, false, Default_Holder>
|
||||
{
|
||||
public:
|
||||
int operator()()
|
||||
@@ -156,7 +156,7 @@ class test_main_template<VoidPointer, false, Void_Allocator>
|
||||
< value_type
|
||||
, typename hooks<VoidPointer>::base_hook_type
|
||||
>::type
|
||||
, GetContainer_With_Allocator< Void_Allocator >::template GetContainer
|
||||
, GetContainer_With_Holder< Default_Holder >::template GetContainer
|
||||
>::test_all();
|
||||
|
||||
test::test_generic_set < typename detail::get_member_value_traits
|
||||
@@ -166,14 +166,14 @@ class test_main_template<VoidPointer, false, Void_Allocator>
|
||||
, &value_type::node_
|
||||
>
|
||||
>::type
|
||||
, GetContainer_With_Allocator< Void_Allocator >::template GetContainer
|
||||
, GetContainer_With_Holder< Default_Holder >::template GetContainer
|
||||
>::test_all();
|
||||
|
||||
test::test_generic_set < typename detail::get_base_value_traits
|
||||
< value_type
|
||||
, typename hooks<VoidPointer>::auto_base_hook_type
|
||||
>::type
|
||||
, GetContainer_With_Allocator< Void_Allocator >::template GetContainer
|
||||
, GetContainer_With_Holder< Default_Holder >::template GetContainer
|
||||
>::test_all();
|
||||
|
||||
test::test_generic_set < typename detail::get_member_value_traits
|
||||
@@ -183,7 +183,7 @@ class test_main_template<VoidPointer, false, Void_Allocator>
|
||||
, &value_type::auto_node_
|
||||
>
|
||||
>::type
|
||||
, GetContainer_With_Allocator< Void_Allocator >::template GetContainer
|
||||
, GetContainer_With_Holder< Default_Holder >::template GetContainer
|
||||
>::test_all();
|
||||
|
||||
return 0;
|
||||
@@ -191,7 +191,7 @@ class test_main_template<VoidPointer, false, Void_Allocator>
|
||||
};
|
||||
|
||||
// container generator which ignores further parametrization, except for compare option
|
||||
template < typename Value_Traits, bool Constant_Time_Size, typename Allocator >
|
||||
template < typename Value_Traits, bool Constant_Time_Size, typename Header_Holder >
|
||||
struct Get_Preset_Container
|
||||
{
|
||||
template < class
|
||||
@@ -210,7 +210,7 @@ struct Get_Preset_Container
|
||||
value_traits< Value_Traits >,
|
||||
constant_time_size< Constant_Time_Size >,
|
||||
compare< compare_option >,
|
||||
node_allocator_type< Allocator >
|
||||
header_holder_type< Header_Holder >
|
||||
> type;
|
||||
};
|
||||
};
|
||||
@@ -226,7 +226,9 @@ struct test_main_template_bptr
|
||||
|
||||
allocator_type::init();
|
||||
test::test_generic_set< value_traits,
|
||||
Get_Preset_Container< value_traits, Constant_Time_Size, allocator_type >::template GetContainer
|
||||
Get_Preset_Container< value_traits, Constant_Time_Size,
|
||||
Bounded_Pointer_Holder< value_type >
|
||||
>::template GetContainer
|
||||
>::test_all();
|
||||
assert(allocator_type::is_clear());
|
||||
allocator_type::destroy();
|
||||
|
||||
Reference in New Issue
Block a user