From adc8658c3f6898f14f20f944e1c92043063d80e8 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Mon, 30 Dec 2024 20:54:43 +0100 Subject: [PATCH] Fix/misc (#28) * added missing test * commented out tests * tested missing member functions --- test/test_all_main.cpp | 2 ++ test/test_comparison.cpp | 4 ++-- test/test_null_variant_collection.cpp | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/test_all_main.cpp b/test/test_all_main.cpp index 8651cd8..bcd54d0 100644 --- a/test/test_all_main.cpp +++ b/test/test_all_main.cpp @@ -16,6 +16,7 @@ #include "test_fixed_variant.hpp" #include "test_insertion.hpp" #include "test_iterators.hpp" +#include "test_null_variant_collection.hpp" #include "test_registration.hpp" int main() @@ -29,6 +30,7 @@ int main() test_fixed_variant(); test_insertion(); test_iterators(); + test_null_variant_collection(); test_registration(); return boost::report_errors(); diff --git a/test/test_comparison.cpp b/test/test_comparison.cpp index 385d43b..9d6b7e6 100644 --- a/test/test_comparison.cpp +++ b/test/test_comparison.cpp @@ -158,7 +158,7 @@ void test_stateless_lambda_comparability_check() void test_comparison() { -/* test_comparison< + test_comparison< any_types::collection,auto_increment, any_types::t1,any_types::t2,any_types::t3, any_types::t4,any_types::t5>(); @@ -169,7 +169,7 @@ void test_comparison() test_comparison< function_types::collection,auto_increment, function_types::t1,function_types::t2,function_types::t3, - function_types::t4,function_types::t5>();*/ + function_types::t4,function_types::t5>(); test_comparison< variant_types::collection,auto_increment, variant_types::t1,variant_types::t2,variant_types::t3, diff --git a/test/test_null_variant_collection.cpp b/test/test_null_variant_collection.cpp index 4d6a4c6..e1dab48 100644 --- a/test/test_null_variant_collection.cpp +++ b/test/test_null_variant_collection.cpp @@ -53,11 +53,18 @@ void test_null_variant_collection() BOOST_TEST_EQ(cc.size(),0); check_throw([&]{(void)cc.size(0);}); + check_throw([&]{(void)cc.max_size(0);}); + check_throw([&]{(void)cc.capacity(0);}); + c.reserve(100); + check_throw([&]{c.reserve(0,100);}); + c.shrink_to_fit(); check_throw([&]{(void)c.shrink_to_fit(0);}); + c.erase(c.begin(),c.end()); + c.clear(); check_throw([&]{(void)c.clear(0);});