From be204dd4fb03027ebeac0bdb4c1d630f21badba2 Mon Sep 17 00:00:00 2001 From: Patrick Date: Wed, 24 Jul 2024 17:57:49 +0200 Subject: [PATCH] implemented test for const_vector::assign(initializer_list) --- test/const_vector/const_vector_constructor.test.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/const_vector/const_vector_constructor.test.cpp b/test/const_vector/const_vector_constructor.test.cpp index a4b5502..268ec99 100644 --- a/test/const_vector/const_vector_constructor.test.cpp +++ b/test/const_vector/const_vector_constructor.test.cpp @@ -1189,11 +1189,15 @@ constexpr test_suite tests = define_tests("Tests") REPEAT_FOR_TYPES_N(([]() constexpr { - cc::const_vector v1(test_defs::get::template arr<1>); - cc::const_vector v2(test_defs::get::template arr<2>); - cc::const_vector::template capacity<1>()> v3; + cc::const_vector::template il_len()> v1; + cc::const_vector::template il_len() - 1> v2; + v1.assign(test_defs::get::template i_list); + ASSERT_TYPE_NUM_VEC_ARR_EQ(v1, test_defs::get::template i_list, T, N); + ASSERT_TYPE_NUM(v1.size() == test_defs::get::template il_len(), T, N); + + ASSERT_TYPE_NUM_THROWS(v2.assign(test_defs::get::template i_list), std::invalid_argument, T, N); return TEST_PASS(); }), 2, int, char, const char *, TestStruct);