forked from boostorg/container
Some comments in the testcases separating test groups.
This commit is contained in:
+35
-26
@@ -365,39 +365,48 @@ int main ()
|
||||
d.resize(1);
|
||||
}
|
||||
|
||||
{
|
||||
if(test_cont_variants< std::allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< std::allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(test_cont_variants< allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(test_cont_variants< node_allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< node_allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(test_cont_variants< adaptive_pool<void> >()){
|
||||
std::cerr << "test_cont_variants< adaptive_pool<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(!test::default_init_test< deque<int, test::default_init_allocator<int> > >()){
|
||||
std::cerr << "Default init test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
////////////////////////////////////
|
||||
// Allocator implementations
|
||||
////////////////////////////////////
|
||||
// std:allocator
|
||||
if(test_cont_variants< std::allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< std::allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
// boost::container::allocator
|
||||
if(test_cont_variants< allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
// boost::container::node_allocator
|
||||
if(test_cont_variants< node_allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< node_allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
// boost::container::adaptive_pool
|
||||
if(test_cont_variants< adaptive_pool<void> >()){
|
||||
std::cerr << "test_cont_variants< adaptive_pool<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
////////////////////////////////////
|
||||
// Default init test
|
||||
////////////////////////////////////
|
||||
if(!test::default_init_test< deque<int, test::default_init_allocator<int> > >()){
|
||||
std::cerr << "Default init test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Emplace testing
|
||||
////////////////////////////////////
|
||||
const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_FRONT | test::EMPLACE_BEFORE);
|
||||
|
||||
if(!boost::container::test::test_emplace
|
||||
< deque<test::EmplaceInt>, Options>())
|
||||
return 1;
|
||||
|
||||
////////////////////////////////////
|
||||
// Allocator propagation testing
|
||||
////////////////////////////////////
|
||||
if(!boost::container::test::test_propagate_allocator<deque>())
|
||||
return 1;
|
||||
|
||||
|
||||
+17
-3
@@ -405,36 +405,50 @@ int main()
|
||||
test_move<flat_multimap<recursive_flat_multimap, recursive_flat_multimap> >();
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Ordered insertion test
|
||||
////////////////////////////////////
|
||||
if(!flat_tree_ordered_insertion_test()){
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Testing allocator implementations
|
||||
////////////////////////////////////
|
||||
// std::allocator
|
||||
if(test_map_variants< std::allocator<void> >()){
|
||||
std::cerr << "test_map_variants< std::allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::allocator
|
||||
if(test_map_variants< allocator<void> >()){
|
||||
std::cerr << "test_map_variants< allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::node_allocator
|
||||
if(test_map_variants< node_allocator<void> >()){
|
||||
std::cerr << "test_map_variants< node_allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::adaptive_pool
|
||||
if(test_map_variants< adaptive_pool<void> >()){
|
||||
std::cerr << "test_map_variants< adaptive_pool<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Emplace testing
|
||||
////////////////////////////////////
|
||||
const test::EmplaceOptions MapOptions = (test::EmplaceOptions)(test::EMPLACE_HINT_PAIR | test::EMPLACE_ASSOC_PAIR);
|
||||
|
||||
if(!boost::container::test::test_emplace<flat_map<test::EmplaceInt, test::EmplaceInt>, MapOptions>())
|
||||
return 1;
|
||||
if(!boost::container::test::test_emplace<flat_multimap<test::EmplaceInt, test::EmplaceInt>, MapOptions>())
|
||||
return 1;
|
||||
|
||||
////////////////////////////////////
|
||||
// Allocator propagation testing
|
||||
////////////////////////////////////
|
||||
if(!boost::container::test::test_propagate_allocator<flat_map_propagate_test_wrapper>())
|
||||
return 1;
|
||||
|
||||
|
||||
+17
-3
@@ -374,36 +374,50 @@ int main()
|
||||
test_move<flat_multiset<recursive_flat_multiset> >();
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Ordered insertion test
|
||||
////////////////////////////////////
|
||||
if(!flat_tree_ordered_insertion_test()){
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Testing allocator implementations
|
||||
////////////////////////////////////
|
||||
// std::allocator
|
||||
if(test_set_variants< std::allocator<void> >()){
|
||||
std::cerr << "test_set_variants< std::allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::allocator
|
||||
if(test_set_variants< allocator<void> >()){
|
||||
std::cerr << "test_set_variants< allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::node_allocator
|
||||
if(test_set_variants< node_allocator<void> >()){
|
||||
std::cerr << "test_set_variants< node_allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::adaptive_pool
|
||||
if(test_set_variants< adaptive_pool<void> >()){
|
||||
std::cerr << "test_set_variants< adaptive_pool<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Emplace testing
|
||||
////////////////////////////////////
|
||||
const test::EmplaceOptions SetOptions = (test::EmplaceOptions)(test::EMPLACE_HINT | test::EMPLACE_ASSOC);
|
||||
|
||||
if(!boost::container::test::test_emplace<flat_set<test::EmplaceInt>, SetOptions>())
|
||||
return 1;
|
||||
if(!boost::container::test::test_emplace<flat_multiset<test::EmplaceInt>, SetOptions>())
|
||||
return 1;
|
||||
|
||||
////////////////////////////////////
|
||||
// Allocator propagation testing
|
||||
////////////////////////////////////
|
||||
if(!boost::container::test::test_propagate_allocator<flat_set_propagate_test_wrapper>())
|
||||
return 1;
|
||||
|
||||
|
||||
+13
-3
@@ -128,31 +128,41 @@ int main ()
|
||||
move_assign.swap(original);
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Testing allocator implementations
|
||||
////////////////////////////////////
|
||||
// std:allocator
|
||||
if(test_cont_variants< std::allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< std::allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::allocator
|
||||
if(test_cont_variants< allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::node_allocator
|
||||
if(test_cont_variants< node_allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< node_allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::adaptive_pool
|
||||
if(test_cont_variants< adaptive_pool<void> >()){
|
||||
std::cerr << "test_cont_variants< adaptive_pool<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Emplace testing
|
||||
////////////////////////////////////
|
||||
const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_FRONT | test::EMPLACE_BEFORE);
|
||||
|
||||
if(!boost::container::test::test_emplace<list<test::EmplaceInt>, Options>())
|
||||
return 1;
|
||||
|
||||
////////////////////////////////////
|
||||
// Allocator propagation testing
|
||||
////////////////////////////////////
|
||||
if(!boost::container::test::test_propagate_allocator<list>())
|
||||
return 1;
|
||||
|
||||
|
||||
+13
-4
@@ -120,27 +120,33 @@ int main ()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Testing allocator implementations
|
||||
////////////////////////////////////
|
||||
// std:allocator
|
||||
if(test_cont_variants< std::allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< std::allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::allocator
|
||||
if(test_cont_variants< allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::node_allocator
|
||||
if(test_cont_variants< node_allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< node_allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::adaptive_pool
|
||||
if(test_cont_variants< adaptive_pool<void> >()){
|
||||
std::cerr << "test_cont_variants< adaptive_pool<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Emplace testing
|
||||
////////////////////////////////////
|
||||
const test::EmplaceOptions Options = (test::EmplaceOptions)
|
||||
(test::EMPLACE_FRONT | test::EMPLACE_AFTER | test::EMPLACE_BEFORE | test::EMPLACE_AFTER);
|
||||
|
||||
@@ -148,6 +154,9 @@ int main ()
|
||||
< slist<test::EmplaceInt>, Options>())
|
||||
return 1;
|
||||
|
||||
////////////////////////////////////
|
||||
// Allocator propagation testing
|
||||
////////////////////////////////////
|
||||
if(!boost::container::test::test_propagate_allocator<slist>())
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -136,36 +136,49 @@ int main()
|
||||
sv.resize(1);
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Testing allocator implementations
|
||||
////////////////////////////////////
|
||||
// std:allocator
|
||||
if(test_cont_variants< std::allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< std::allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::allocator
|
||||
if(test_cont_variants< allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::node_allocator
|
||||
if(test_cont_variants< node_allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< node_allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::adaptive_pool
|
||||
if(test_cont_variants< adaptive_pool<void> >()){
|
||||
std::cerr << "test_cont_variants< adaptive_pool<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Default init test
|
||||
////////////////////////////////////
|
||||
if(!test::default_init_test< stable_vector<int, test::default_init_allocator<int> > >()){
|
||||
std::cerr << "Default init test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Emplace testing
|
||||
////////////////////////////////////
|
||||
const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_BEFORE);
|
||||
if(!boost::container::test::test_emplace
|
||||
< stable_vector<test::EmplaceInt>, Options>())
|
||||
return 1;
|
||||
|
||||
////////////////////////////////////
|
||||
// Allocator propagation testing
|
||||
////////////////////////////////////
|
||||
if(!boost::container::test::test_propagate_allocator<stable_vector>())
|
||||
return 1;
|
||||
|
||||
|
||||
@@ -471,12 +471,21 @@ int main()
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Backwards expansion test
|
||||
////////////////////////////////////
|
||||
if(!test_expand_bwd())
|
||||
return 1;
|
||||
|
||||
////////////////////////////////////
|
||||
// Allocator propagation testing
|
||||
////////////////////////////////////
|
||||
if(!boost::container::test::test_propagate_allocator<string_propagate_test_wrapper>())
|
||||
return 1;
|
||||
|
||||
////////////////////////////////////
|
||||
// Default init test
|
||||
////////////////////////////////////
|
||||
if(!test::default_init_test< basic_string<char, std::char_traits<char>, test::default_init_allocator<char> > >()){
|
||||
std::cerr << "Default init test failed" << std::endl;
|
||||
return 1;
|
||||
|
||||
+19
-3
@@ -189,21 +189,25 @@ int main()
|
||||
move_assign.swap(original);
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Testing allocator implementations
|
||||
////////////////////////////////////
|
||||
// std:allocator
|
||||
if(test_cont_variants< std::allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< std::allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::allocator
|
||||
if(test_cont_variants< allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::node_allocator
|
||||
if(test_cont_variants< node_allocator<void> >()){
|
||||
std::cerr << "test_cont_variants< node_allocator<void> > failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// boost::container::adaptive_pool
|
||||
if(test_cont_variants< adaptive_pool<void> >()){
|
||||
std::cerr << "test_cont_variants< adaptive_pool<void> > failed" << std::endl;
|
||||
return 1;
|
||||
@@ -218,19 +222,31 @@ int main()
|
||||
v.push_back(Test());
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Backwards expansion test
|
||||
////////////////////////////////////
|
||||
if(test_expand_bwd())
|
||||
return 1;
|
||||
|
||||
////////////////////////////////////
|
||||
// Default init test
|
||||
////////////////////////////////////
|
||||
if(!test::default_init_test< vector<int, test::default_init_allocator<int> > >()){
|
||||
std::cerr << "Default init test failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Emplace testing
|
||||
////////////////////////////////////
|
||||
const test::EmplaceOptions Options = (test::EmplaceOptions)(test::EMPLACE_BACK | test::EMPLACE_BEFORE);
|
||||
if(!boost::container::test::test_emplace< vector<test::EmplaceInt>, Options>()){
|
||||
return 1;
|
||||
}
|
||||
|
||||
////////////////////////////////////
|
||||
// Allocator propagation testing
|
||||
////////////////////////////////////
|
||||
if(!boost::container::test::test_propagate_allocator<vector>()){
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user