5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_INLINE_CONTAINER_TESTING_DEQUE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_INLINE_CONTAINER_TESTING_DEQUE_HPP_
8#include <gtest/gtest.h>
10#include "arene/base/algorithm/equal.hpp"
11#include "arene/base/array/array.hpp"
12#include "arene/base/compiler_support/diagnostics.hpp"
13#include "arene/base/constraints/constraints.hpp"
14#include "arene/base/inline_container/deque.hpp"
15#include "arene/base/inline_container/testing/customization.hpp"
16#include "arene/base/iterator/distance.hpp"
17#include "arene/base/iterator/next.hpp"
18#include "arene/base/stdlib_choice/addressof.hpp"
19#include "arene/base/stdlib_choice/conditional.hpp"
20#include "arene/base/stdlib_choice/cstddef.hpp"
21#include "arene/base/stdlib_choice/declval.hpp"
22#include "arene/base/stdlib_choice/forward.hpp"
23#include "arene/base/stdlib_choice/ignore.hpp"
24#include "arene/base/stdlib_choice/initializer_list.hpp"
25#include "arene/base/stdlib_choice/integer_sequence.hpp"
26#include "arene/base/stdlib_choice/is_assignable.hpp"
27#include "arene/base/stdlib_choice/is_constructible.hpp"
28#include "arene/base/stdlib_choice/is_copy_assignable.hpp"
29#include "arene/base/stdlib_choice/is_copy_constructible.hpp"
30#include "arene/base/stdlib_choice/is_default_constructible.hpp"
31#include "arene/base/stdlib_choice/is_move_assignable.hpp"
32#include "arene/base/stdlib_choice/is_move_constructible.hpp"
33#include "arene/base/stdlib_choice/is_trivially_copyable.hpp"
34#include "arene/base/stdlib_choice/iterator_tags.hpp"
35#include "arene/base/stdlib_choice/move.hpp"
36#include "arene/base/stdlib_choice/numeric_limits.hpp"
37#include "arene/base/testing/gtest.hpp"
38#include "arene/base/type_traits/is_copyable.hpp"
39#include "arene/base/type_traits/is_implicitly_constructible.hpp"
40#include "arene/base/type_traits/is_invocable.hpp"
41#include "arene/base/type_traits/is_movable.hpp"
42#include "arene/base/type_traits/iterator_category_traits.hpp"
43#include "testlibs/utilities/iterator_types.hpp"
44#include "testlibs/utilities/throws_on.hpp"
51ARENE_IGNORE_ALL(
"-Wfloat-equal",
"These tests don't perform arithmetic, so equality is OK even for floating point");
59constexpr auto test_deque(std::size_t begin, std::size_t end)
noexcept(
63 for (std::size_t i = begin; i < end; i++) {
64 deque.push_back(test_value<
typename T::value_type>(i));
89template <
typename Deque>
91 using T =
typename Deque::value_type;
99 "Constexpr-compatible types must have constexpr specializations of test_value_array or test_value"
108 return ::arene::base::testing::test_value<T>(idx);
113 static constexpr auto construct()
noexcept(
noexcept(
Deque())) -> Deque {
return Deque(); }
119 static constexpr auto test_deque(std::size_t begin, std::size_t end)
noexcept(
129 return test_deque(0, size);
135 return test_deque(Deque::capacity / 2U);
141 return test_deque(Deque::capacity);
148 Deque deque = test_deque(Deque::capacity);
149 for (std::size_t i{}; i < Deque::capacity / 2U; ++i) {
151 deque.push_back(::arene::base::testing::test_value<T>(Deque::capacity + i));
159 template <std::size_t... Indices>
161 return ::arene::base::testing::test_initializer_list<T, Indices...>();
167 template <std::size_t Size>
169 return test_initializer_list(std::make_index_sequence<Size>{});
175 return test_initializer_list<Deque::capacity>();
181template <
typename Deque>
197 TypeParam
const deque;
198 EXPECT_EQ(deque.size(), 0);
200 auto maybe_deque = TypeParam::try_construct();
201 ASSERT_TRUE(maybe_deque.has_value());
202 EXPECT_EQ(maybe_deque->size(), 0);
207 COND_STATIC_ASSERT_EQ(TestFixture::construct().capacity(), TypeParam::capacity);
220 deque.push_front(TestFixture::test_value(0));
221 EXPECT_EQ(deque.size(), 1);
228 deque.push_back(TestFixture::test_value(0));
229 EXPECT_EQ(deque.size(), 1);
235 auto& front_ref = deque.emplace_front(TestFixture::test_value(0));
236 EXPECT_EQ(std::addressof(front_ref), std::addressof(deque.front()));
242 auto& back_ref = deque.emplace_back(TestFixture::test_value(0));
243 EXPECT_EQ(std::addressof(back_ref), std::addressof(deque.back()));
250 deque.push_front(TestFixture::test_value(0));
251 ASSERT_EQ(deque.size(), 1);
252 EXPECT_EQ(deque.front(), TestFixture::test_value(0));
253 EXPECT_EQ(deque.back(), TestFixture::test_value(0));
255 TypeParam
const& as_const(deque);
256 EXPECT_EQ(as_const.front(), TestFixture::test_value(0));
257 EXPECT_EQ(as_const.back(), TestFixture::test_value(0));
264 deque.push_back(TestFixture::test_value(0));
265 ASSERT_EQ(deque.size(), 1);
266 EXPECT_EQ(deque.back(), TestFixture::test_value(0));
267 EXPECT_EQ(deque.front(), TestFixture::test_value(0));
269 TypeParam
const& as_const(deque);
270 EXPECT_EQ(as_const.back(), TestFixture::test_value(0));
271 EXPECT_EQ(as_const.front(), TestFixture::test_value(0));
278 for (
typename TypeParam::size_type i = 0; i < TypeParam::capacity(); i++) {
279 deque.push_front(TestFixture::test_value(i));
281 EXPECT_EQ(deque.size(), TypeParam::capacity());
288 for (
typename TypeParam::size_type i = 0; i < TypeParam::capacity(); i++) {
289 deque.push_back(TestFixture::test_value(i));
291 EXPECT_EQ(deque.size(), TypeParam::capacity());
298 for (
typename TypeParam::size_type i = 0; i < TypeParam::capacity(); i++) {
299 deque.push_front(TestFixture::test_value(i));
302 ASSERT_DEATH(deque.push_front(TestFixture::test_value(TypeParam::capacity())),
"Precondition violation");
308 using deque_impl = arene::base::inline_deque_detail::inline_deque_impl<
309 typename TypeParam::value_type,
310 TypeParam::capacity(),
311 TypeParam::wrapping_allowed
315 for (
typename TypeParam::size_type i = 0; i < TypeParam::capacity(); i++) {
316 deque.push_front(TestFixture::test_value(i));
319 if (deque.wrapping_allowed()) {
320 EXPECT_EQ(deque.front(), TestFixture::test_value(TypeParam::capacity() - 1U));
321 EXPECT_EQ(deque.back(), TestFixture::test_value(0));
322 deque.push_front(TestFixture::test_value(TypeParam::capacity()));
323 EXPECT_EQ(deque.front(), TestFixture::test_value(TypeParam::capacity()));
324 EXPECT_EQ(deque.back(), TestFixture::test_value(1));
326 ASSERT_DEATH(deque.push_front(TestFixture::test_value(TypeParam::capacity())),
"Precondition violation");
334 for (
typename TypeParam::size_type i = 0; i < TypeParam::capacity(); i++) {
335 deque.push_back(TestFixture::test_value(i));
338 if (deque.wrapping_allowed()) {
339 EXPECT_EQ(deque.back(), TestFixture::test_value(TypeParam::capacity() - 1U));
340 EXPECT_EQ(deque.front(), TestFixture::test_value(0));
341 deque.push_back(TestFixture::test_value(TypeParam::capacity()));
342 EXPECT_EQ(deque.back(), TestFixture::test_value(TypeParam::capacity()));
343 EXPECT_EQ(deque.front(), TestFixture::test_value(1));
345 ASSERT_DEATH(deque.push_back(TestFixture::test_value(TypeParam::capacity())),
"Precondition violation");
351 using value_type =
typename TypeParam::value_type;
353 auto inserter = [](
auto& deque,
354 auto&& value)
noexcept(
noexcept(deque.insert(deque.begin(), std::forward<
decltype(value)>(value)))
355 ) ->
decltype(deque.insert(deque.begin(), std::forward<
decltype(value)>(value))) {
return {}; };
357 constexpr bool shift_ok = std::is_move_assignable<value_type>::value && std::is_move_constructible<value_type>::value;
358 constexpr bool copy_insert_ok = shift_ok && std::is_copy_assignable<value_type>::value;
359 constexpr bool move_insert_ok = shift_ok;
361 STATIC_ASSERT_EQ((arene::base::is_invocable_v<
decltype(inserter), TypeParam&, value_type
const&>), copy_insert_ok);
362 STATIC_ASSERT_EQ((arene::base::is_invocable_v<
decltype(inserter), TypeParam&, value_type&&>), move_insert_ok);
364 constexpr bool shift_noexcept =
365 std::is_nothrow_move_constructible<value_type>::value && std::is_nothrow_move_assignable<value_type>::value;
366 constexpr bool copy_insert_noexcept =
367 copy_insert_ok && shift_noexcept && std::is_nothrow_copy_constructible<value_type>::value;
368 constexpr bool move_insert_noexcept = move_insert_ok && shift_noexcept;
371 (arene::base::is_nothrow_invocable_v<
decltype(inserter), TypeParam&, value_type
const&>),
375 (arene::base::is_nothrow_invocable_v<
decltype(inserter), TypeParam&, value_type&&>),
387 using index_type =
typename TypeParam::iterator::difference_type;
389 TypeParam deque = TestFixture::half_test_deque();
390 for (
typename TypeParam::size_type i = 0U; i < TypeParam::capacity() / 2U; ++i) {
392 auto const pos = next(deque.cbegin(),
static_cast<index_type>(2U * i));
394 typename TypeParam::value_type
const new_value = TestFixture::test_value((TypeParam::capacity() / 2U) + i);
395 auto new_iter = deque.insert(pos, new_value);
398 EXPECT_EQ(distance(deque.begin(), new_iter),
static_cast<index_type>(2U * i));
401 for (
typename TypeParam::size_type i = 0U; i < TypeParam::capacity() / 2U; ++i) {
402 EXPECT_EQ(deque[
static_cast<index_type>(2U * i)], TestFixture::test_value(TypeParam::capacity() / 2U + i));
403 EXPECT_EQ(deque[
static_cast<index_type>((2U * i) + 1U)], TestFixture::test_value(i));
414 using index_type =
typename TypeParam::iterator::difference_type;
416 TypeParam deque = TestFixture::half_test_deque();
417 for (
typename TypeParam::size_type i = 0U; i < TypeParam::capacity() / 2U; ++i) {
419 auto const pos = next(deque.cbegin(),
static_cast<index_type>(2U * i));
421 deque.insert(pos, TestFixture::test_value((TypeParam::capacity() / 2U) + i));
424 for (
typename TypeParam::size_type i = 0U; i < TypeParam::capacity() / 2U; ++i) {
425 EXPECT_EQ(deque[
static_cast<index_type>(2U * i)], TestFixture::test_value(TypeParam::capacity() / 2U + i));
426 EXPECT_EQ(deque[
static_cast<index_type>((2U * i) + 1U)], TestFixture::test_value(i));
437 typename TypeParam::value_type
const value = TestFixture::test_value(TypeParam::capacity() / 2U);
439 TypeParam deque = TestFixture::half_test_deque();
440 typename TypeParam::size_type expected_size = deque.size();
442 if (deque.size() == deque.capacity()) {
447 deque.insert(deque.cend(), value);
448 EXPECT_EQ(deque.size(), expected_size);
449 EXPECT_EQ(deque.back(), value);
459 typename TypeParam::value_type
const value = TestFixture::test_value(TypeParam::capacity() / 2U);
460 typename TypeParam::value_type value_again = TestFixture::test_value(TypeParam::capacity() / 2U);
462 TypeParam deque = TestFixture::half_test_deque();
463 typename TypeParam::size_type expected_size = deque.size();
465 if (deque.size() == deque.capacity()) {
470 deque.insert(deque.cend(), std::move(value_again));
471 EXPECT_EQ(deque.size(), expected_size);
472 EXPECT_EQ(deque.back(), value);
477 InlineDequeDeathTest,
482 TypeParam deque = TestFixture::full_test_deque();
484 auto pos = next(deque.begin());
485 for (
typename TypeParam::size_type i{0U}; i <= deque.capacity(); ++i) {
486 ASSERT_DEATH(deque.insert(pos, TestFixture::test_value(TypeParam::capacity() + i)),
"Precondition violation");
497 for (std::size_t i = 0; i < 2 * TypeParam::capacity(); i++) {
498 deque.push_front(TestFixture::test_value(i));
499 EXPECT_EQ(deque.back(), TestFixture::test_value(i));
510 for (std::size_t i = 0; i < 2 * TypeParam::capacity(); i++) {
511 deque.push_back(TestFixture::test_value(i));
512 EXPECT_EQ(deque.front(), TestFixture::test_value(i));
528 deque.push_front(TestFixture::test_value(0));
529 EXPECT_EQ(deque.back(), TestFixture::test_value(0));
531 EXPECT_EQ(deque.back(), TestFixture::test_value(0));
533 deque.push_front(TestFixture::test_value(1));
534 EXPECT_EQ(deque.size(), 2);
536 EXPECT_EQ(deque.back(), TestFixture::test_value(0));
538 EXPECT_EQ(deque.back(), TestFixture::test_value(1));
539 EXPECT_EQ(deque.size(), 1);
549 deque.push_back(TestFixture::test_value(0));
550 EXPECT_EQ(deque.front(), TestFixture::test_value(0));
552 EXPECT_EQ(deque.front(), TestFixture::test_value(0));
554 deque.push_back(TestFixture::test_value(1));
555 EXPECT_EQ(deque.size(), 2);
557 EXPECT_EQ(deque.front(), TestFixture::test_value(0));
559 EXPECT_EQ(deque.front(), TestFixture::test_value(1));
560 EXPECT_EQ(deque.size(), 1);
571 deque.push_front(TestFixture::test_value(0));
572 deque.push_front(TestFixture::test_value(1));
573 EXPECT_EQ(deque.back(), TestFixture::test_value(0));
574 deque.back() = TestFixture::test_value(2);
575 EXPECT_EQ(deque.back(), TestFixture::test_value(2));
576 EXPECT_EQ(deque.size(), 2);
578 EXPECT_EQ(deque.back(), TestFixture::test_value(1));
585 deque.push_back(TestFixture::test_value(0));
586 deque.push_back(TestFixture::test_value(1));
587 EXPECT_EQ(deque.front(), TestFixture::test_value(0));
588 deque.front() = TestFixture::test_value(2);
589 EXPECT_EQ(deque.front(), TestFixture::test_value(2));
590 EXPECT_EQ(deque.size(), 2);
592 EXPECT_EQ(deque.front(), TestFixture::test_value(1));
601 auto deque = TestFixture::construct();
602 auto const value = TestFixture::test_value(0);
603 deque.push_front(value);
604 EXPECT_EQ(deque.front(), value);
605 EXPECT_NE(std::addressof(deque.front()), std::addressof(value));
610 auto deque = TestFixture::construct();
611 auto const value = TestFixture::test_value(0);
612 deque.push_back(value);
613 EXPECT_EQ(deque.back(), value);
614 EXPECT_NE(std::addressof(deque.back()), std::addressof(value));
620 ASSERT_DEATH(deque.back(),
"Precondition violation");
626 TypeParam
const deque;
627 ASSERT_DEATH(deque.back(),
"Precondition violation");
633 ASSERT_DEATH(deque.pop_front(),
"Precondition violation");
639 ASSERT_DEATH(deque.pop_back(),
"Precondition violation");
645 ASSERT_DEATH(deque.front(),
"Precondition violation");
651 TypeParam
const deque;
652 ASSERT_DEATH(deque.front(),
"Precondition violation");
657 constexpr bool copy_ok = std::is_copy_constructible<
typename TypeParam::value_type>::value;
659 (std::is_constructible<TypeParam, TypeParam
const&>::value) == copy_ok,
660 "inline_deque<T> should be copy-constructible if and only if T is"
666 constexpr bool move_ok = std::is_move_constructible<
typename TypeParam::value_type>::value;
668 (std::is_constructible<TypeParam, TypeParam&&>::value) == move_ok,
669 "inline_deque<T> should be move-constructible if and only if T is"
676 (std::is_assignable<TypeParam, TypeParam
const&>::value) == arene::base::is_copyable_v<TypeParam>,
677 "inline_deque<T> should be copy-assignable if and only if T is copy-constructible and -assignable"
684 (std::is_assignable<TypeParam, TypeParam&&>::value) == arene::base::is_movable_v<TypeParam>,
685 "inline_deque<T> should be move-assignable if and only if T is move-constructible and -assignable"
691 constexpr auto deque = TestFixture::full_test_deque();
692 STATIC_ASSERT_EQ(deque.size(), deque.capacity());
693 STATIC_ASSERT_EQ(deque.front(), TestFixture::test_value(0));
694 STATIC_ASSERT_EQ(deque.back(), TestFixture::test_value(deque.size() - 1U));
699 using random_access_it =
typename TypeParam::value_type
const*;
700 using bidirectional_it = ::testing::demoted_iterator<random_access_it, std::bidirectional_iterator_tag>;
701 using forward_it = ::testing::demoted_iterator<random_access_it, std::forward_iterator_tag>;
702 using input_it = ::testing::demoted_iterator<random_access_it, std::input_iterator_tag>;
705 (std::is_constructible<TypeParam, random_access_it, random_access_it>::value),
706 std::is_copy_constructible<
typename TypeParam::value_type>::value
709 (std::is_constructible<TypeParam, bidirectional_it, bidirectional_it>::value),
710 std::is_copy_constructible<
typename TypeParam::value_type>::value
713 (std::is_constructible<TypeParam, forward_it, forward_it>::value),
714 std::is_copy_constructible<
typename TypeParam::value_type>::value
716 STATIC_ASSERT_FALSE(std::is_constructible<TypeParam, input_it, input_it>::value);
721 using ::testing::throws_on;
722 using value_type =
typename TypeParam::value_type;
724 using normal_it = ::testing::noexcept_configurable_random_access_iterator<throws_on::nothing, value_type>;
725 using rvalue_it = testing::rvalue_iterator<value_type>;
726 using throwing_it = ::testing::noexcept_configurable_random_access_iterator<throws_on::minus_self, value_type>;
729 (std::is_nothrow_constructible<TypeParam, normal_it, normal_it>::value),
730 std::is_nothrow_copy_constructible<value_type>::value
733 (std::is_nothrow_constructible<TypeParam, rvalue_it, rvalue_it>::value),
734 std::is_nothrow_move_constructible<value_type>::value
736 STATIC_ASSERT_FALSE(std::is_nothrow_constructible<TypeParam, throwing_it, throwing_it>::value);
741 auto const init_list = TestFixture::full_test_initializer_list();
742 TypeParam
const deque(init_list.begin(), init_list.end());
744 ASSERT_EQ(deque.size(), init_list.size());
745 EXPECT_TRUE(::arene::base::equal(deque.begin(), deque.end(), init_list.begin()));
747 auto const try_deque = TypeParam::try_construct(init_list.begin(), init_list.end());
748 ASSERT_TRUE(try_deque.has_value());
749 EXPECT_TRUE(::arene::base::equal(try_deque->begin(), try_deque->end(), init_list.begin()));
754 TypeParam
const deque(
755 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(0),
756 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(TypeParam::capacity())
760 auto const init_list = TestFixture::full_test_initializer_list();
761 ASSERT_EQ(deque.size(), init_list.size());
762 EXPECT_TRUE(::arene::base::equal(deque.begin(), deque.end(), init_list.begin()));
764 auto const try_deque = TypeParam::try_construct(
765 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(0),
766 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(TypeParam::capacity())
768 ASSERT_TRUE(try_deque.has_value());
769 EXPECT_TRUE(::arene::base::equal(try_deque->begin(), try_deque->end(), init_list.begin()));
775 (std::is_constructible<TypeParam, std::initializer_list<
typename TypeParam::value_type>>::value),
776 std::is_copy_constructible<
typename TypeParam::value_type>::value
780 (is_list_initializable_v<TypeParam,
typename TypeParam::value_type>),
781 std::is_copy_constructible<
typename TypeParam::value_type>::value
788 (std::is_nothrow_constructible<TypeParam, std::initializer_list<
typename TypeParam::value_type>>::value),
789 std::is_nothrow_copy_constructible<
typename TypeParam::value_type>::value
795 auto const init_list = TestFixture::full_test_initializer_list();
796 TypeParam
const deque(init_list);
798 ASSERT_EQ(deque.size(), init_list.size());
799 EXPECT_TRUE(::arene::base::equal(deque.begin(), deque.end(), init_list.begin()));
801 auto const try_deque = TypeParam::try_construct(init_list);
802 ASSERT_TRUE(try_deque.has_value());
803 EXPECT_TRUE(::arene::base::equal(try_deque->begin(), try_deque->end(), init_list.begin()));
808 auto const init_list = TestFixture::
template test_initializer_list<0U>();
810 TypeParam
const deque_from_ilist(init_list);
811 EXPECT_EQ(deque_from_ilist.size(), 0U);
813 TypeParam
const deque_from_range(init_list.begin(), init_list.end());
814 EXPECT_EQ(deque_from_range.size(), 0U);
816 auto const try_deque_from_ilist = TypeParam::try_construct(init_list);
817 ASSERT_TRUE(try_deque_from_ilist.has_value());
818 EXPECT_EQ(try_deque_from_ilist->size(), 0U);
820 auto const try_deque_from_range = TypeParam::try_construct(init_list.begin(), init_list.end());
821 ASSERT_TRUE(try_deque_from_range.has_value());
822 EXPECT_EQ(try_deque_from_range->size(), 0U);
827 InlineDequeDeathTest,
829 std::is_copy_constructible<TypeParam>::value
831 auto const init_list = TestFixture::full_test_initializer_list();
832 ASSERT_DEATH(TypeParam(init_list.end(), init_list.begin()),
"Precondition");
839 std::is_copy_constructible<TypeParam>::value
841 auto const init_list = TestFixture::full_test_initializer_list();
842 EXPECT_FALSE(TypeParam::try_construct(init_list.end(), init_list.begin()).has_value());
847 InlineDequeDeathTest,
849 std::is_copy_constructible<TypeParam>::value
851 auto const init_list = TestFixture::
template test_initializer_list<TypeParam::capacity() + 1U>();
852 ASSERT_DEATH(TypeParam(init_list.begin(), init_list.end()),
"Precondition");
859 std::is_copy_constructible<TypeParam>::value
861 auto const init_list = TestFixture::
template test_initializer_list<TypeParam::capacity() + 1U>();
862 EXPECT_FALSE(TypeParam::try_construct(init_list.begin(), init_list.end()).has_value());
869 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(TypeParam::capacity()),
870 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(0)
878 EXPECT_FALSE(TypeParam::try_construct(
879 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(TypeParam::capacity()),
880 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(0)
889 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(0),
890 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(TypeParam::capacity() + 1U)
898 EXPECT_FALSE(TypeParam::try_construct(
899 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(0),
900 arene::base::testing::rvalue_iterator<
typename TypeParam::value_type>(TypeParam::capacity() + 1U)
907 InlineDequeDeathTest,
909 std::is_copy_constructible<TypeParam>::value
911 auto const init_list = TestFixture::
template test_initializer_list<TypeParam::capacity() + 1U>();
912 ASSERT_DEATH(
static_cast<
void>(TypeParam(init_list)),
"Precondition");
919 std::is_copy_constructible<TypeParam>::value
921 auto const init_list = TestFixture::
template test_initializer_list<TypeParam::capacity() + 1U>();
922 EXPECT_FALSE(TypeParam::try_construct(init_list).has_value());
927 auto org = TestFixture::full_test_deque();
929 EXPECT_EQ(org.size(), org.capacity());
930 EXPECT_EQ(org.size(), dst.size());
931 for (std::size_t i = 0; i < org.capacity(); i++) {
932 EXPECT_EQ(TestFixture::test_value(i), dst.front());
933 EXPECT_EQ(org.front(), dst.front());
937 EXPECT_TRUE(org.empty());
938 EXPECT_TRUE(dst.empty());
943 auto org = TestFixture::full_test_deque();
944 auto dst = TypeParam::try_construct(org);
946 ASSERT_TRUE(dst.has_value());
947 EXPECT_TRUE(::arene::base::equal(org.begin(), org.end(), dst->begin()));
952 auto org = TestFixture::full_test_deque();
953 EXPECT_EQ(org.size(), org.capacity());
954 TypeParam dst(std::move(org));
955 EXPECT_EQ(dst.size(), dst.capacity());
956 for (std::size_t i = 0; i < dst.capacity(); i++) {
957 EXPECT_EQ(TestFixture::test_value(i), dst.front());
960 EXPECT_TRUE(dst.empty());
965 auto org = TestFixture::full_test_deque();
966 auto tmp = TestFixture::full_test_deque();
967 auto dst = TypeParam::try_construct(std::move(tmp));
969 ASSERT_TRUE(dst.has_value());
970 EXPECT_TRUE(::arene::base::equal(org.begin(), org.end(), dst->begin()));
975 auto org = TestFixture::full_test_deque();
977 EXPECT_EQ(org.size(), org.capacity());
978 EXPECT_EQ(dst.size(), 0);
980 EXPECT_EQ(org.size(), org.capacity());
981 EXPECT_EQ(dst.size(), org.capacity());
982 for (std::size_t i = 0; i < org.capacity(); i++) {
983 EXPECT_EQ(TestFixture::test_value(i), dst.front());
984 EXPECT_EQ(org.front(), dst.front());
988 EXPECT_TRUE(org.empty());
989 EXPECT_TRUE(dst.empty());
994 TypeParam deque = TestFixture::full_test_deque();
997 ARENE_IGNORE_CLANG(
"-Wself-assign-overloaded",
"We're specifically testing self assignment");
1000 ASSERT_EQ(deque.size(), deque.capacity());
1003 for (std::size_t i = 0; i < deque.size(); ++i) {
1004 EXPECT_EQ(deque.front(), TestFixture::test_value(i));
1011 auto org = TestFixture::full_test_deque();
1013 ASSERT_EQ(org.size(), org.capacity());
1014 ASSERT_EQ(dst.size(), 0);
1016 dst = std::move(org);
1017 ASSERT_EQ(dst.size(), org.capacity());
1018 for (std::size_t i = 0; i < org.capacity(); i++) {
1019 EXPECT_EQ(TestFixture::test_value(i), dst.front());
1022 EXPECT_TRUE(dst.empty());
1027 TypeParam deque = TestFixture::full_test_deque();
1029 deque = std::move(deque);
1030 ASSERT_EQ(deque.size(), deque.capacity());
1032 for (std::size_t i = 0; i < deque.size(); ++i) {
1033 EXPECT_EQ(deque.front(), TestFixture::test_value(i));
1040 auto org = TestFixture::full_test_deque();
1041 auto dst = TestFixture::full_test_deque();
1044 while (dst.size() > dst.capacity() / 2U) {
1049 ASSERT_EQ(dst.size(), org.capacity());
1050 for (std::size_t i = 0; i < org.capacity(); i++) {
1051 EXPECT_EQ(TestFixture::test_value(i), dst.front());
1058 auto org = TestFixture::full_test_deque();
1059 auto dst = TestFixture::full_test_deque();
1062 std::size_t removed_count{};
1063 while (org.size() > org.capacity() / 2U) {
1069 ASSERT_EQ(dst.size(), org.capacity() / 2U);
1070 for (std::size_t i = 0; i < org.capacity() / 2U; i++) {
1071 EXPECT_EQ(TestFixture::test_value(i + removed_count), dst.front());
1078 auto org = TestFixture::full_test_deque();
1079 auto dst = TestFixture::full_test_deque();
1082 while (dst.size() > dst.capacity() / 2U) {
1086 dst = std::move(org);
1087 ASSERT_EQ(dst.size(), org.capacity());
1088 for (std::size_t i = 0; i < org.capacity(); i++) {
1089 EXPECT_EQ(TestFixture::test_value(i), dst.front());
1096 auto org = TestFixture::full_test_deque();
1097 auto dst = TestFixture::full_test_deque();
1100 std::size_t removed_count{};
1101 while (org.size() > org.capacity() / 2U) {
1106 dst = std::move(org);
1107 ASSERT_EQ(dst.size(), org.capacity() / 2U);
1108 for (std::size_t i = 0; i < org.capacity() / 2U; i++) {
1109 EXPECT_EQ(TestFixture::test_value(i + removed_count), dst.front());
1116 STATIC_ASSERT_TRUE(arene::base::is_random_access_iterator_v<
typename TypeParam::iterator>);
1117 STATIC_ASSERT_TRUE(arene::base::is_random_access_iterator_v<
typename TypeParam::const_iterator>);
1118 STATIC_ASSERT_TRUE(
noexcept(std::declval<TypeParam&>().begin()));
1119 STATIC_ASSERT_TRUE(
noexcept(std::declval<TypeParam&>().cbegin()));
1120 STATIC_ASSERT_TRUE(
noexcept(std::declval<TypeParam&>().rbegin()));
1121 STATIC_ASSERT_TRUE(
noexcept(std::declval<TypeParam&>().crbegin()));
1122 STATIC_ASSERT_TRUE(
noexcept(std::declval<TypeParam&>().end()));
1123 STATIC_ASSERT_TRUE(
noexcept(std::declval<TypeParam&>().cend()));
1124 STATIC_ASSERT_TRUE(
noexcept(std::declval<TypeParam&>().rend()));
1125 STATIC_ASSERT_TRUE(
noexcept(std::declval<TypeParam&>().crend()));
1130 using iterator =
typename TypeParam::iterator;
1131 using const_iterator =
typename TypeParam::const_iterator;
1133 STATIC_ASSERT_TRUE(arene::base::is_implicitly_constructible_v<const_iterator, iterator>);
1134 STATIC_ASSERT_FALSE(arene::base::is_implicitly_constructible_v<iterator, const_iterator>);
1136 TypeParam deque = TestFixture::full_test_deque();
1137 EXPECT_EQ(std::addressof(*deque.begin()), std::addressof(*deque.cbegin()));
1138 EXPECT_EQ(deque.begin(), deque.cbegin());
1143 TypeParam
const deque = TestFixture::full_test_deque();
1145 std::size_t value_idx{0U};
1146 for (
auto const& element : deque) {
1147 EXPECT_EQ(element, TestFixture::test_value(value_idx));
1154 TypeParam
const deque = TestFixture::wrapped_test_deque();
1157 std::size_t value_idx{(deque.capacity() / 2U)};
1158 for (
auto const& element : deque) {
1159 EXPECT_EQ(element, TestFixture::test_value(value_idx));
1167 TypeParam deque = TestFixture::wrapped_test_deque();
1170 std::size_t value_idx{};
1171 for (
auto& element : deque) {
1172 element = TestFixture::test_value(value_idx);
1178 for (
auto itr = deque.cbegin(); itr != deque.cend(); ++itr) {
1179 EXPECT_EQ(*itr, TestFixture::test_value(value_idx));
1186 TypeParam
const deque = TestFixture::wrapped_test_deque();
1189 std::size_t idx{deque.capacity() + (deque.capacity() / 2U) - 1U};
1190 for (
auto itr = deque.crbegin(); itr != deque.crend(); ++itr) {
1191 EXPECT_EQ(*itr, TestFixture::test_value(idx));
1199 TypeParam deque = TestFixture::wrapped_test_deque();
1202 std::size_t value_idx{};
1203 for (
auto itr = deque.rbegin(); itr != deque.rend(); ++itr) {
1204 *itr = TestFixture::test_value(value_idx);
1209 for (
auto const& element : deque) {
1211 EXPECT_EQ(element, TestFixture::test_value(value_idx));
1218 TypeParam deque = TestFixture::test_deque(2U);
1220 auto itr = deque.cbegin();
1221 for (std::size_t value_idx{}; value_idx / 3U < TypeParam::capacity(); ++value_idx) {
1222 EXPECT_EQ(*itr, TestFixture::test_value(value_idx));
1225 deque.push_back(TestFixture::test_value(value_idx + 2U));
1241 TypeParam deque = TestFixture::construct();
1242 deque.push_front(TestFixture::test_value(0U));
1243 deque.push_front(TestFixture::test_value(1U));
1244 deque.push_front(TestFixture::test_value(2U));
1246 auto itr = deque.crbegin();
1248 for (std::size_t value_idx{1U}; value_idx / 3U < TypeParam::capacity(); ++value_idx) {
1249 EXPECT_EQ(*itr, TestFixture::test_value(value_idx));
1252 deque.push_front(TestFixture::test_value(value_idx + 2U));
1258 using difference_type =
typename TypeParam::iterator::difference_type;
1260 TypeParam deque = TestFixture::full_test_deque();
1263 for (difference_type diff{}; diff <=
static_cast<difference_type>(deque.size()); ++diff) {
1264 auto begin_copy = deque.begin();
1266 EXPECT_EQ(begin_copy, deque.begin() + diff);
1267 EXPECT_EQ(begin_copy, diff + deque.begin());
1269 auto cbegin_copy = deque.cbegin();
1270 cbegin_copy += diff;
1271 EXPECT_EQ(cbegin_copy, deque.cbegin() + diff);
1272 EXPECT_EQ(cbegin_copy, diff + deque.cbegin());
1278 using difference_type =
typename TypeParam::iterator::difference_type;
1280 TypeParam deque = TestFixture::full_test_deque();
1283 for (difference_type diff{}; diff <=
static_cast<difference_type>(deque.size()); ++diff) {
1284 auto end_copy = deque.end();
1286 EXPECT_EQ(end_copy, deque.end() - diff);
1288 auto cend_copy = deque.cend();
1290 EXPECT_EQ(cend_copy, deque.cend() - diff);
1296 using difference_type =
typename TypeParam::iterator::difference_type;
1298 TypeParam deque = TestFixture::full_test_deque();
1300 for (difference_type diff{}; diff <
static_cast<difference_type>(deque.size()); ++diff) {
1301 EXPECT_EQ(std::addressof(deque.begin()[diff]), std::addressof(*(deque.begin() + diff)));
1302 EXPECT_EQ(std::addressof(deque.cbegin()[diff]), std::addressof(*(deque.cbegin() + diff)));
1304 EXPECT_EQ(std::addressof(deque.rbegin()[diff]), std::addressof(*(deque.rbegin() + diff)));
1305 EXPECT_EQ(std::addressof(deque.crbegin()[diff]), std::addressof(*(deque.crbegin() + diff)));
1311 using difference_type =
typename TypeParam::iterator::difference_type;
1313 TypeParam deque = TestFixture::full_test_deque();
1314 TypeParam
const& const_deque = deque;
1316 for (difference_type diff{}; diff <
static_cast<difference_type>(deque.size()); ++diff) {
1317 EXPECT_EQ(std::addressof(deque[diff]), std::addressof(deque.begin()[diff]));
1318 EXPECT_EQ(std::addressof(const_deque[diff]), std::addressof(deque.cbegin()[diff]));
1324 using difference_type =
typename TypeParam::iterator::difference_type;
1328 using deque_array = std::
1329 conditional_t<TypeParam::capacity() >= 2U, arene::base::array<TypeParam, 2U>, arene::base::array<TypeParam, 1U>>;
1331 deques[0U] = TestFixture::full_test_deque();
1332 if (deques.size() >= 2U) {
1333 deques[1U] = TestFixture::half_test_deque();
1336 for (
auto& deque : deques) {
1337 auto const signed_size =
static_cast<difference_type>(deque.size());
1339 auto current = deque.begin();
1340 auto const_current = deque.cbegin();
1341 for (difference_type current_pos{}; current_pos <= signed_size; ++current_pos) {
1344 auto test_iter = deque.begin();
1345 auto const_test_iter = deque.cbegin();
1346 for (difference_type diff{-current_pos}; diff < (signed_size - current_pos); ++diff) {
1347 EXPECT_EQ(test_iter - current, diff);
1348 EXPECT_EQ(const_test_iter - const_current, diff);
1362 using difference_type =
typename TypeParam::iterator::difference_type;
1364 TypeParam deque = TestFixture::full_test_deque();
1365 auto curr = deque.begin();
1366 auto const_curr = deque.cbegin();
1367 for (difference_type diff{}; diff <=
static_cast<difference_type>(deque.size()); ++diff) {
1368 EXPECT_EQ(deque.begin() + diff, curr);
1371 EXPECT_EQ(deque.cbegin() + diff, const_curr);
1378 using difference_type =
typename TypeParam::iterator::difference_type;
1380 TypeParam deque = TestFixture::full_test_deque();
1381 auto curr = deque.end();
1382 auto const_curr = deque.cend();
1383 for (difference_type diff{}; diff <=
static_cast<difference_type>(deque.size()); ++diff) {
1384 EXPECT_EQ(deque.end() - diff, curr);
1387 EXPECT_EQ(deque.cend() - diff, const_curr);
1394 using difference_type =
typename TypeParam::iterator::difference_type;
1396 TypeParam deque = TestFixture::full_test_deque();
1397 auto start = deque.begin();
1398 auto const_start = deque.cbegin();
1399 for (
auto diff =
static_cast<difference_type>(deque.size()); diff >= 0; --diff) {
1400 EXPECT_EQ(start + diff, deque.end());
1401 EXPECT_EQ(const_start + diff, deque.cend());
1409 TypeParam deque = TestFixture::construct();
1410 EXPECT_EQ(deque.begin(), deque.end());
1411 EXPECT_EQ(deque.cbegin(), deque.cend());
1412 EXPECT_EQ(deque.rbegin(), deque.rend());
1413 EXPECT_EQ(deque.crbegin(), deque.crend());
1417template <
typename T>
1419 EXPECT_TRUE(first < second);
1420 EXPECT_TRUE(first <= second);
1421 EXPECT_FALSE(first > second);
1422 EXPECT_FALSE(first >= second);
1424 EXPECT_FALSE(second < first);
1425 EXPECT_FALSE(second <= first);
1426 EXPECT_TRUE(second > first);
1427 EXPECT_TRUE(second >= first);
1432 TypeParam deque = TestFixture::full_test_deque();
1434 auto curr = deque.begin();
1435 auto const_curr = deque.cbegin();
1436 for (std::size_t i{}; i + 1U < deque.size(); ++i) {
1440 check_ordering(deque.begin(), curr);
1441 check_ordering(deque.cbegin(), const_curr);
1442 check_ordering(curr, deque.end());
1443 check_ordering(const_curr, deque.cend());
1449 TypeParam deque = TestFixture::full_test_deque();
1450 ASSERT_DEATH(*deque.end(),
"Precondition");
1451 ASSERT_DEATH(*deque.cend(),
"Precondition");
1452 ASSERT_DEATH(
static_cast<
void>(*deque.rend()),
"Precondition");
1453 ASSERT_DEATH(
static_cast<
void>(*deque.crend()),
"Precondition");
1458 TypeParam deque = TestFixture::construct();
1459 ASSERT_DEATH(*deque.begin(),
"Precondition");
1460 ASSERT_DEATH(*deque.cbegin(),
"Precondition");
1461 ASSERT_DEATH(
static_cast<
void>(*deque.rbegin()),
"Precondition");
1462 ASSERT_DEATH(
static_cast<
void>(*deque.crbegin()),
"Precondition");
1467 TypeParam deque = TestFixture::full_test_deque();
1469 typename TypeParam::iterator default_it;
1470 EXPECT_NE(default_it, deque.begin());
1471 EXPECT_NE(default_it, deque.end());
1472 ASSERT_DEATH(*default_it,
"Precondition");
1473 ASSERT_DEATH(default_it += 0,
"Precondition");
1478 TypeParam deque = TestFixture::full_test_deque();
1480 typename TypeParam::const_iterator default_it;
1481 EXPECT_NE(default_it, deque.cbegin());
1482 EXPECT_NE(default_it, deque.cend());
1483 ASSERT_DEATH(*default_it,
"Precondition");
1484 ASSERT_DEATH(default_it += 0,
"Precondition");
1489 TypeParam deque1 = TestFixture::full_test_deque();
1490 TypeParam deque2 = TestFixture::full_test_deque();
1492 ASSERT_DEATH(std::ignore = (deque1.begin() < deque2.begin()),
"Precondition");
1493 ASSERT_DEATH(std::ignore = (deque1.begin() <= deque2.begin()),
"Precondition");
1494 ASSERT_DEATH(std::ignore = (deque1.begin() > deque2.begin()),
"Precondition");
1495 ASSERT_DEATH(std::ignore = (deque1.begin() >= deque2.begin()),
"Precondition");
1500 TypeParam deque = TestFixture::full_test_deque();
1503 constexpr auto minimum_value = std::numeric_limits<
typename TypeParam::iterator::difference_type>::lowest();
1505 ASSERT_DEATH(std::ignore = (deque.begin() - minimum_value),
"Precondition");
1506 ASSERT_DEATH(std::ignore = (deque.cbegin() - minimum_value),
"Precondition");
1591 InlineDequeDeathTest,
The death tests use the same fixture as the non-death tests, but as a distinct type to improve log ou...
Definition deque.hpp:182
Test fixture for all type-parameterized inline_deque tests.
Definition deque.hpp:90
static constexpr auto construct() noexcept(noexcept(Deque())) -> Deque
Return an empty Deque, allowing to call as this->construct, which becomes useful with the ....
Definition deque.hpp:113
static constexpr auto test_deque(std::size_t size) noexcept(noexcept(test_deque(0, size))) -> Deque
Return a Deque containing the test values [0,size) of T.
Definition deque.hpp:128
static constexpr auto test_deque(std::size_t begin, std::size_t end) noexcept(noexcept(::arene::base::testing::test_deque< Deque >(begin, end))) -> Deque
Return a Deque containing the test values [begin,end) of T.
Definition deque.hpp:119
static constexpr auto wrapped_test_deque() noexcept(noexcept(test_deque(Deque::capacity))) -> Deque
Return a Deque containing the test values [capacity/2, 3*capacity/2) of T.
Definition deque.hpp:147
static constexpr auto test_initializer_list() noexcept -> std::initializer_list< T >
Return a std::initializer_list containing user-parameterized test_values.
Definition deque.hpp:168
static constexpr auto half_test_deque() noexcept(noexcept(test_deque(Deque::capacity))) -> Deque
Return a Deque containing the test values [0,capacity/2) of T.
Definition deque.hpp:134
static constexpr bool constexpr_compatible
Whether the type parameter is constexpr compatible for this test.
Definition deque.hpp:95
static constexpr auto full_test_initializer_list() noexcept -> std::initializer_list< T >
Return a std::initializer_list containing Deque::capacity user-parameterized test_values.
Definition deque.hpp:174
static constexpr auto full_test_deque() noexcept(noexcept(test_deque(Deque::capacity))) -> Deque
Return a Deque containing the test values [0,capacity) of T.
Definition deque.hpp:140
static constexpr auto test_value(std::size_t idx) noexcept(noexcept(::arene::base::testing::test_value< T >(idx))) ->
Return the idx 'th test value of the current T , parameterized by test suite users.
Definition deque.hpp:106
static constexpr auto test_initializer_list(std::index_sequence< Indices... >) noexcept -> std::initializer_list< T >
Return a std::initializer_list containing user-parameterized test_values.
Definition deque.hpp:160
Definition customization.hpp:36
constexpr auto test_deque(std::size_t begin, std::size_t end) noexcept(std::is_nothrow_copy_constructible< typename T::value_type >::value) -> T
Create a test deque containing a range of test values.
Definition deque.hpp:59
constexpr bool is_list_initializable_v
A type trait to check if a type is list-initializable using a brace-enclosed list of values with a gi...
Definition deque.hpp:74
ARENE_IGNORE_ALL("-Wfloat-equal", "These tests don't perform arithmetic, so equality is OK even for floating point")
Definition array_exceptions_disabled.cpp:11
CONDITIONAL_TYPED_TEST_P(InlineDequeTest, PushFrontOneElement, is_double_ended< TypeParam >)
Definition deque.hpp:218
REGISTER_TYPED_TEST_SUITE_P(InlineDequeDeathTest, PushFrontMoreThanCapacity, PushBackMoreThanCapacity, NonWrappingInsertOneWhenFull, BackWhenEmpty, ConstBackWhenEmpty, PopFrontWhenEmpty, PopBackWhenEmpty, FrontWhenEmpty, ConstFrontWhenEmpty, CopyConstructFromBackwardRange, CopyConstructFromOversizedRange, MoveConstructFromBackwardRange, MoveConstructFromOversizedRange, ConstructFromOversizedInitializerList, DereferencingEndIteratorIsPreconditionViolation, DereferencingBeginOfEmptyDequeIsPreconditionViolation, DefaultConstructedIteratorCantBeUsed, DefaultConstructedConstIteratorCantBeUsed, IteratorOrderingFromDifferentDequesIsPreconditionViolation, SubtractingIteratorByMinimumValueIsPreconditionViolation)
auto check_ordering(T const &first, T const &second) noexcept -> void
Check that the first value is ordered strictly before the second.
Definition deque.hpp:1418
constexpr bool is_double_ended
Type trait to see if a particular TypeParam is double-ended or not; used to exclude some tests.
Definition deque.hpp:189
TYPED_TEST_P(InlineDequeTest, CanConstruct)
Definition deque.hpp:196
CONDITIONAL_TYPED_TEST_P(InlineDequeTest, IteratorsNotInvalidatedByPopFront, TypeParam::capacity() >=2U)
Definition deque.hpp:1216
TYPED_TEST_SUITE_P(InlineDequeTest)
REGISTER_TYPED_TEST_SUITE_P(InlineDequeTest, CanConstruct, CapacityIsAsSpecified, CapacityIsNoexcept, SizeIsNoexcept, PushFrontOneElement, PushBackOneElement, EmplaceFrontReturnsReference, EmplaceBackReturnsReference, FrontPushedElementIsCorrect, BackPushedElementIsCorrect, PushFrontWithinCapacity, PushBackWithinCapacity, PushFrontDetailCoverage, InsertConstraints, CopyInsertOne, MoveInsertOne, CopyInsertOneAtEnd, MoveInsertOneAtEnd, GoCircularFromFront, GoCircularFromBack, BasicFunctionFromFront, BasicFunctionFromBack, CanObserveAndModifyFromFront, CanObserveAndModifyFromBack, PushFrontCopiesLvalues, PushBackCopiesLvalues, NotCopyConstructibleIfDataTypeNotCopyConstructible, NotMoveConstructibleIfDataTypeNotMoveConstructible, NotCopyAssignableIfDataTypeNotCopyConstructibleAndCopyAssignable, NotMoveAssignableIfDataTypeNotMoveConstructibleAndMoveAssignable, CanConstructAtCompileTime, RangeConstructionSfinae, RangeConstructionNoexcept, CopyConstructFromRange, MoveConstructFromRange, InitializerListConstructionSfinae, InitializerListConstructionNoexcept, ConstructFromInitializerList, ConstructFromEmptyList, TryCopyConstructFromBackwardRange, TryCopyConstructFromOversizedRange, TryMoveConstructFromBackwardRange, TryMoveConstructFromOversizedRange, TryConstructFromOversizedInitializerList, CanCopyConstruct, CanCopyTryConstruct, CanMoveConstruct, CanMoveTryConstruct, CanCopyAssign, SelfCopyAssign, CanMoveAssign, SelfMoveAssign, CopyAssignIntoPartiallyFull, CopyAssignFromPartiallyFull, MoveAssignIntoPartiallyFull, MoveAssignFromPartiallyFull, IteratorsAreRandomAccessAndNoexcept, NonConstIteratorsImplicitlyConvertibleToConst, InspectWithIterators, IteratorsWrapAround, MutableIteratorsWork, InspectWithReverseIterators, MutableReverseIteratorsWork, IteratorsNotInvalidatedByPopFront, IteratorsNotInvalidatedByPopBack, BinaryPlusEquivalentToPlusEquals, BinaryMinusEquivalentToMinusEquals, IteratorBracketOperatorEquivalentToBinaryPlus, ContainerBracketOperatorEquivalentToIteratorBracketOperator, AnyIteratorDifferenceReturnsDistance, IteratorForwardMovementIsTheSameAsRepeatedIncrementing, IteratorBackwardMovementIsTheSameAsRepeatedDecrementing, IteratorsIncrementedOutOfBoundsBecomeEnd, EmptyDequeBeginEqualsEnd, IteratorsAreOrdered)
TYPED_TEST_SUITE_P(InlineDequeDeathTest)
CONDITIONAL_TYPED_TEST_P(InlineDequeTest, BasicFunctionFromBack, TypeParam::capacity >=2)
Definition deque.hpp:546
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10