mirror of
https://github.com/boostorg/poly_collection.git
synced 2026-07-21 13:33:37 +00:00
Fix/misc (#28)
* added missing test * commented out tests * tested missing member functions
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
#include "test_fixed_variant.hpp"
|
#include "test_fixed_variant.hpp"
|
||||||
#include "test_insertion.hpp"
|
#include "test_insertion.hpp"
|
||||||
#include "test_iterators.hpp"
|
#include "test_iterators.hpp"
|
||||||
|
#include "test_null_variant_collection.hpp"
|
||||||
#include "test_registration.hpp"
|
#include "test_registration.hpp"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
@@ -29,6 +30,7 @@ int main()
|
|||||||
test_fixed_variant();
|
test_fixed_variant();
|
||||||
test_insertion();
|
test_insertion();
|
||||||
test_iterators();
|
test_iterators();
|
||||||
|
test_null_variant_collection();
|
||||||
test_registration();
|
test_registration();
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ void test_stateless_lambda_comparability_check()
|
|||||||
|
|
||||||
void test_comparison()
|
void test_comparison()
|
||||||
{
|
{
|
||||||
/* test_comparison<
|
test_comparison<
|
||||||
any_types::collection,auto_increment,
|
any_types::collection,auto_increment,
|
||||||
any_types::t1,any_types::t2,any_types::t3,
|
any_types::t1,any_types::t2,any_types::t3,
|
||||||
any_types::t4,any_types::t5>();
|
any_types::t4,any_types::t5>();
|
||||||
@@ -169,7 +169,7 @@ void test_comparison()
|
|||||||
test_comparison<
|
test_comparison<
|
||||||
function_types::collection,auto_increment,
|
function_types::collection,auto_increment,
|
||||||
function_types::t1,function_types::t2,function_types::t3,
|
function_types::t1,function_types::t2,function_types::t3,
|
||||||
function_types::t4,function_types::t5>();*/
|
function_types::t4,function_types::t5>();
|
||||||
test_comparison<
|
test_comparison<
|
||||||
variant_types::collection,auto_increment,
|
variant_types::collection,auto_increment,
|
||||||
variant_types::t1,variant_types::t2,variant_types::t3,
|
variant_types::t1,variant_types::t2,variant_types::t3,
|
||||||
|
|||||||
@@ -53,11 +53,18 @@ void test_null_variant_collection()
|
|||||||
BOOST_TEST_EQ(cc.size(),0);
|
BOOST_TEST_EQ(cc.size(),0);
|
||||||
check_throw<unregistered_type>([&]{(void)cc.size(0);});
|
check_throw<unregistered_type>([&]{(void)cc.size(0);});
|
||||||
|
|
||||||
|
check_throw<unregistered_type>([&]{(void)cc.max_size(0);});
|
||||||
|
|
||||||
check_throw<unregistered_type>([&]{(void)cc.capacity(0);});
|
check_throw<unregistered_type>([&]{(void)cc.capacity(0);});
|
||||||
|
|
||||||
|
c.reserve(100);
|
||||||
|
check_throw<unregistered_type>([&]{c.reserve(0,100);});
|
||||||
|
|
||||||
c.shrink_to_fit();
|
c.shrink_to_fit();
|
||||||
check_throw<unregistered_type>([&]{(void)c.shrink_to_fit(0);});
|
check_throw<unregistered_type>([&]{(void)c.shrink_to_fit(0);});
|
||||||
|
|
||||||
|
c.erase(c.begin(),c.end());
|
||||||
|
|
||||||
c.clear();
|
c.clear();
|
||||||
check_throw<unregistered_type>([&]{(void)c.clear(0);});
|
check_throw<unregistered_type>([&]{(void)c.clear(0);});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user