20#include <xrpl/beast/clock/manual_clock.h>
21#include <xrpl/beast/container/aged_map.h>
22#include <xrpl/beast/container/aged_multimap.h>
23#include <xrpl/beast/container/aged_multiset.h>
24#include <xrpl/beast/container/aged_set.h>
25#include <xrpl/beast/container/aged_unordered_map.h>
26#include <xrpl/beast/container/aged_unordered_multimap.h>
27#include <xrpl/beast/container/aged_unordered_multiset.h>
28#include <xrpl/beast/container/aged_unordered_set.h>
29#include <xrpl/beast/unit_test.h>
34#ifndef BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR
36#define BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR 0
38#define BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR 1
42#ifndef BEAST_CONTAINER_EXTRACT_NOREF
44#define BEAST_CONTAINER_EXTRACT_NOREF 1
46#define BEAST_CONTAINER_EXTRACT_NOREF 1
107 return m_eq(lhs, rhs);
150 return !(*
this == o);
156 return static_cast<T*
>(::operator
new(n *
sizeof(T)));
162 ::operator
delete(p);
165#if !BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR
178 template <
class Base,
bool IsUnordered>
194 template <
class Base>
212 template <
class Base,
bool IsMulti>
225 template <
class Base>
238 template <
class Base,
bool IsMap>
246 static typename Base::Key
const&
274 template <
class Base>
282 static typename Base::Key
const&
311 template <
class Base,
bool IsUnordered = Base::is_unordered::value>
318 Base::is_multi::value,
322 typename Base::Clock,
328 template <
class Base>
336 Base::is_multi::value,
340 typename Base::Clock,
355 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
358 MaybeMulti<MaybeMap<TestTraitsBase, IsMap>, IsMulti>,
384 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
386 ContType<TestTraitsHelper<IsUnordered, IsMulti, IsMap>>
390 template <
class Cont>
398 template <
class Traits>
403 typename Traits::Value
const& lhs,
404 typename Traits::Value
const& rhs)
406 return Traits::extract(lhs) == Traits::extract(rhs);
410 template <
class Cont>
419 template <
class Container,
class Values>
421 Container::is_map::value && !Container::is_multi::value>::type
424 template <
class Container,
class Values>
426 !(Container::is_map::value && !Container::is_multi::value)>::type
432 template <
class C,
class Values>
437 template <
class C,
class Values>
444 template <
class C,
class Values>
448 template <
class Cont,
class Values>
452 template <
class Cont>
459 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
464 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
469 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
474 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
479 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
484 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
490 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
496 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
501 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
505 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
513 template <
class Container,
class Values>
517 template <
class Container,
class Values>
521 template <
class Container,
class Values>
525 template <
class Container,
class Values>
529 template <
class Container,
class Values>
533 template <
class Container,
class Values>
537 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
543 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
550 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
554 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
563 template <
class Container,
class Values>
567 template <
class Iter>
573 template <
class Container,
class Iter>
575 doElementErase(Container& c, Iter
const beginItr, Iter
const endItr);
577 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
583 template <
class Container,
class BeginEndSrc>
585 doRangeErase(Container& c, BeginEndSrc
const& beginEndSrc);
587 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
594 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
598 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
607 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
612 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
618 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
622 template <
bool IsUnordered,
bool IsMulti>
626 template <
bool IsUnordered>
635template <
class Container,
class Values>
637 Container::is_map::value && !Container::is_multi::value>::type
644 BEAST_EXPECT(c.empty());
645 BEAST_EXPECT(c.size() == 0);
652 for (
auto const& e : v)
654 for (
auto const& e : v)
655 BEAST_EXPECT(c.operator[](e.first) == e.second);
659 fail(
"caught exception");
664template <
class C,
class Values>
673 Cont::is_unordered::value,
674 Cont::is_multi::value,
675 Cont::is_map::value>;
676 using size_type =
typename Cont::size_type;
677 auto const hash(c.hash_function());
678 auto const key_eq(c.key_eq());
679 for (size_type i(0); i < c.bucket_count(); ++i)
681 auto const last(c.end(i));
682 for (
auto iter(c.begin(i)); iter != last; ++iter)
687 [iter](
typename Values::value_type
const& e) {
688 return Traits::extract(*iter) == Traits::extract(e);
690 BEAST_EXPECT(match != v.end());
692 key_eq(Traits::extract(*iter), Traits::extract(*match)));
694 hash(Traits::extract(*iter)) == hash(Traits::extract(*match)));
699template <
class C,
class Values>
707 Cont::is_unordered::value,
708 Cont::is_multi::value,
709 Cont::is_map::value>;
710 using size_type =
typename Cont::size_type;
712 BEAST_EXPECT(c.size() == v.size());
713 BEAST_EXPECT(size_type(
std::distance(c.begin(), c.end())) == v.size());
714 BEAST_EXPECT(size_type(
std::distance(c.cbegin(), c.cend())) == v.size());
717 c.chronological.begin(), c.chronological.end())) == v.size());
720 c.chronological.cbegin(), c.chronological.cend())) == v.size());
723 c.chronological.rbegin(), c.chronological.rend())) == v.size());
726 c.chronological.crbegin(), c.chronological.crend())) == v.size());
731template <
class Cont,
class Values>
745 Cont::is_unordered::value,
746 Cont::is_multi::value,
747 Cont::is_map::value>;
748 using Values =
typename Traits::Values;
759template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
764 using Value =
typename Traits::Value;
765 using Key =
typename Traits::Key;
766 using T =
typename Traits::T;
767 using Clock =
typename Traits::Clock;
768 using Comp =
typename Traits::Comp;
769 using Alloc =
typename Traits::Alloc;
770 using MyComp =
typename Traits::MyComp;
771 using MyAlloc =
typename Traits::MyAlloc;
772 typename Traits::ManualClock clock;
778 typename Traits::template Cont<Comp, Alloc> c(clock);
783 typename Traits::template Cont<MyComp, Alloc> c(clock, MyComp(1));
788 typename Traits::template Cont<Comp, MyAlloc> c(clock, MyAlloc(1));
793 typename Traits::template Cont<MyComp, MyAlloc> c(
794 clock, MyComp(1), MyAlloc(1));
800template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
804 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
805 using Value =
typename Traits::Value;
806 using Key =
typename Traits::Key;
807 using T =
typename Traits::T;
808 using Clock =
typename Traits::Clock;
809 using Hash =
typename Traits::Hash;
810 using Equal =
typename Traits::Equal;
811 using Alloc =
typename Traits::Alloc;
812 using MyHash =
typename Traits::MyHash;
813 using MyEqual =
typename Traits::MyEqual;
814 using MyAlloc =
typename Traits::MyAlloc;
815 typename Traits::ManualClock clock;
820 typename Traits::template Cont<Hash, Equal, Alloc> c(clock);
825 typename Traits::template Cont<MyHash, Equal, Alloc> c(
831 typename Traits::template Cont<Hash, MyEqual, Alloc> c(
837 typename Traits::template Cont<Hash, Equal, MyAlloc> c(
843 typename Traits::template Cont<MyHash, MyEqual, Alloc> c(
844 clock, MyHash(1), MyEqual(1));
849 typename Traits::template Cont<MyHash, Equal, MyAlloc> c(
850 clock, MyHash(1), MyAlloc(1));
855 typename Traits::template Cont<Hash, MyEqual, MyAlloc> c(
856 clock, MyEqual(1), MyAlloc(1));
861 typename Traits::template Cont<MyHash, MyEqual, MyAlloc> c(
862 clock, MyHash(1), MyEqual(1), MyAlloc(1));
868template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
873 using Value =
typename Traits::Value;
874 using Key =
typename Traits::Key;
875 using T =
typename Traits::T;
876 using Clock =
typename Traits::Clock;
877 using Comp =
typename Traits::Comp;
878 using Alloc =
typename Traits::Alloc;
879 using MyComp =
typename Traits::MyComp;
880 using MyAlloc =
typename Traits::MyAlloc;
881 typename Traits::ManualClock clock;
882 auto const v(Traits::values());
888 typename Traits::template Cont<Comp, Alloc> c(
889 v.begin(), v.end(), clock);
894 typename Traits::template Cont<MyComp, Alloc> c(
895 v.begin(), v.end(), clock, MyComp(1));
900 typename Traits::template Cont<Comp, MyAlloc> c(
901 v.begin(), v.end(), clock, MyAlloc(1));
906 typename Traits::template Cont<MyComp, MyAlloc> c(
907 v.begin(), v.end(), clock, MyComp(1), MyAlloc(1));
914 typename Traits::template Cont<Comp, Alloc> c1(
915 v.begin(), v.end(), clock);
916 typename Traits::template Cont<Comp, Alloc> c2(clock);
923template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
927 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
928 using Value =
typename Traits::Value;
929 using Key =
typename Traits::Key;
930 using T =
typename Traits::T;
931 using Clock =
typename Traits::Clock;
932 using Hash =
typename Traits::Hash;
933 using Equal =
typename Traits::Equal;
934 using Alloc =
typename Traits::Alloc;
935 using MyHash =
typename Traits::MyHash;
936 using MyEqual =
typename Traits::MyEqual;
937 using MyAlloc =
typename Traits::MyAlloc;
938 typename Traits::ManualClock clock;
939 auto const v(Traits::values());
945 typename Traits::template Cont<Hash, Equal, Alloc> c(
946 v.begin(), v.end(), clock);
951 typename Traits::template Cont<MyHash, Equal, Alloc> c(
952 v.begin(), v.end(), clock, MyHash(1));
957 typename Traits::template Cont<Hash, MyEqual, Alloc> c(
958 v.begin(), v.end(), clock, MyEqual(1));
963 typename Traits::template Cont<Hash, Equal, MyAlloc> c(
964 v.begin(), v.end(), clock, MyAlloc(1));
969 typename Traits::template Cont<MyHash, MyEqual, Alloc> c(
970 v.begin(), v.end(), clock, MyHash(1), MyEqual(1));
975 typename Traits::template Cont<MyHash, Equal, MyAlloc> c(
976 v.begin(), v.end(), clock, MyHash(1), MyAlloc(1));
981 typename Traits::template Cont<Hash, MyEqual, MyAlloc> c(
982 v.begin(), v.end(), clock, MyEqual(1), MyAlloc(1));
987 typename Traits::template Cont<MyHash, MyEqual, MyAlloc> c(
988 v.begin(), v.end(), clock, MyHash(1), MyEqual(1), MyAlloc(1));
994template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
999 using Value =
typename Traits::Value;
1000 using Key =
typename Traits::Key;
1001 using T =
typename Traits::T;
1002 using Clock =
typename Traits::Clock;
1003 using Comp =
typename Traits::Comp;
1004 using Alloc =
typename Traits::Alloc;
1005 using MyComp =
typename Traits::MyComp;
1006 using MyAlloc =
typename Traits::MyAlloc;
1007 typename Traits::ManualClock clock;
1018template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1022 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
1023 using Value =
typename Traits::Value;
1024 using Key =
typename Traits::Key;
1025 using T =
typename Traits::T;
1026 using Clock =
typename Traits::Clock;
1027 using Hash =
typename Traits::Hash;
1028 using Equal =
typename Traits::Equal;
1029 using Alloc =
typename Traits::Alloc;
1030 using MyHash =
typename Traits::MyHash;
1031 using MyEqual =
typename Traits::MyEqual;
1032 using MyAlloc =
typename Traits::MyAlloc;
1033 typename Traits::ManualClock clock;
1048template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1053 using Value =
typename Traits::Value;
1054 using Alloc =
typename Traits::Alloc;
1055 typename Traits::ManualClock clock;
1056 auto const v(Traits::values());
1064 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1065 typename Traits::template Cont<> c2(c);
1068 BEAST_EXPECT(c == c2);
1073 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1074 typename Traits::template Cont<> c2(c, Alloc());
1077 BEAST_EXPECT(c == c2);
1082 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1083 typename Traits::template Cont<> c2(clock);
1087 BEAST_EXPECT(c == c2);
1094 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1095 typename Traits::template Cont<> c2(std::move(c));
1100 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1101 typename Traits::template Cont<> c2(std::move(c), Alloc());
1106 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1107 typename Traits::template Cont<> c2(clock);
1119template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1124 using Value =
typename Traits::Value;
1125 using Alloc =
typename Traits::Alloc;
1126 typename Traits::ManualClock clock;
1127 auto const v(Traits::values());
1132 typename Traits::template Cont<> c{clock};
1134 using iterator =
decltype(c.begin());
1135 using const_iterator =
decltype(c.cbegin());
1138 iterator nnIt_0{c.begin()};
1139 iterator nnIt_1{nnIt_0};
1140 BEAST_EXPECT(nnIt_0 == nnIt_1);
1143 BEAST_EXPECT(nnIt_1 == nnIt_2);
1147 const_iterator ccIt_0{c.cbegin()};
1148 const_iterator ccIt_1{ccIt_0};
1149 BEAST_EXPECT(ccIt_0 == ccIt_1);
1150 const_iterator ccIt_2;
1152 BEAST_EXPECT(ccIt_1 == ccIt_2);
1155 BEAST_EXPECT(nnIt_0 == ccIt_0);
1156 BEAST_EXPECT(ccIt_1 == nnIt_1);
1159 const_iterator ncIt_3{c.begin()};
1160 const_iterator ncIt_4{nnIt_0};
1161 BEAST_EXPECT(ncIt_3 == ncIt_4);
1162 const_iterator ncIt_5;
1164 BEAST_EXPECT(ncIt_5 == ncIt_4);
1177template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1182 using Value =
typename Traits::Value;
1183 using Alloc =
typename Traits::Alloc;
1184 typename Traits::ManualClock clock;
1185 auto const v(Traits::values());
1190 typename Traits::template Cont<> c{clock};
1192 using iterator =
decltype(c.begin());
1193 using const_iterator =
decltype(c.cbegin());
1194 using reverse_iterator =
decltype(c.rbegin());
1195 using const_reverse_iterator =
decltype(c.crbegin());
1206 reverse_iterator rNrNit_0{c.rbegin()};
1207 reverse_iterator rNrNit_1{rNrNit_0};
1208 BEAST_EXPECT(rNrNit_0 == rNrNit_1);
1209 reverse_iterator xXrNit_2;
1210 xXrNit_2 = rNrNit_1;
1211 BEAST_EXPECT(rNrNit_1 == xXrNit_2);
1215 const_reverse_iterator rCrCit_0{c.crbegin()};
1216 const_reverse_iterator rCrCit_1{rCrCit_0};
1217 BEAST_EXPECT(rCrCit_0 == rCrCit_1);
1218 const_reverse_iterator xXrCit_2;
1219 xXrCit_2 = rCrCit_1;
1220 BEAST_EXPECT(rCrCit_1 == xXrCit_2);
1223 BEAST_EXPECT(rNrNit_0 == rCrCit_0);
1224 BEAST_EXPECT(rCrCit_1 == rNrNit_1);
1228 const_reverse_iterator rNrCit_0{c.rbegin()};
1229 const_reverse_iterator rNrCit_1{rNrNit_0};
1230 BEAST_EXPECT(rNrCit_0 == rNrCit_1);
1231 xXrCit_2 = rNrNit_1;
1232 BEAST_EXPECT(rNrCit_1 == xXrCit_2);
1240 reverse_iterator fNrNit_0{c.begin()};
1241 const_reverse_iterator fNrCit_0{c.begin()};
1242 BEAST_EXPECT(fNrNit_0 == fNrCit_0);
1243 const_reverse_iterator fCrCit_0{c.cbegin()};
1244 BEAST_EXPECT(fNrCit_0 == fCrCit_0);
1265template <
class Container,
class Values>
1271 for (
auto const& e : v)
1276template <
class Container,
class Values>
1284 c.insert(std::move(e));
1288template <
class Container,
class Values>
1294 for (
auto const& e : v)
1295 c.insert(c.cend(), e);
1299template <
class Container,
class Values>
1307 c.insert(c.cend(), std::move(e));
1311template <
class Container,
class Values>
1317 for (
auto const& e : v)
1322template <
class Container,
class Values>
1328 for (
auto const& e : v)
1329 c.emplace_hint(c.cend(), e);
1333template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1338 typename Traits::ManualClock clock;
1339 auto const v(Traits::values());
1346 typename Traits::template Cont<> c(clock);
1351 typename Traits::template Cont<> c(clock);
1356 typename Traits::template Cont<> c(clock);
1361 typename Traits::template Cont<> c(clock);
1366 typename Traits::template Cont<> c(clock);
1371 typename Traits::template Cont<> c(clock);
1376 typename Traits::template Cont<> c(clock);
1381 typename Traits::template Cont<> c(clock);
1392template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1397 using Value =
typename Traits::Value;
1398 typename Traits::ManualClock clock;
1399 auto const v(Traits::values());
1404 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1407 c.chronological.cbegin(),
1408 c.chronological.cend(),
1414 for (
auto iter(v.crbegin()); iter != v.crend(); ++iter)
1416 using iterator =
typename decltype(c)::iterator;
1417 iterator found(c.find(Traits::extract(*iter)));
1419 BEAST_EXPECT(found != c.cend());
1420 if (found == c.cend())
1426 c.chronological.cbegin(),
1427 c.chronological.cend(),
1433 for (
auto iter(v.cbegin()); iter != v.cend(); ++iter)
1435 using const_iterator =
typename decltype(c)::const_iterator;
1436 const_iterator found(c.find(Traits::extract(*iter)));
1438 BEAST_EXPECT(found != c.cend());
1439 if (found == c.cend())
1445 c.chronological.cbegin(),
1446 c.chronological.cend(),
1466template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1471 typename Traits::ManualClock clock;
1472 auto v(Traits::values());
1479 typename Traits::template Cont<> c(clock);
1481 c[e.first] = e.second;
1487 typename Traits::template Cont<> c(clock);
1489 c[std::move(e.first)] = e.second;
1500template <
class Container,
class Values>
1504 Values
const& values)
1512 ManualClock& clk(
dynamic_cast<ManualClock&
>(c.clock()));
1528template <
class Iter>
1534 if (beginIter == endIter)
1536 fail(
"Internal test failure. Cannot advance beginIter");
1541 Iter nextToEnd = beginIter;
1544 nextToEnd = beginIter++;
1545 }
while (beginIter != endIter);
1562template <
class Container,
class Iter>
1566 Iter
const beginItr,
1570 size_t count = c.size();
1571 while (it != endItr)
1579 fail(
"Unexpected returned iterator from element erase");
1584 if (count != c.size())
1586 fail(
"Failed to erase element");
1594 fail(
"Erase of last element didn't produce end");
1608template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1618 typename Traits::ManualClock clock;
1619 typename Traits::template Cont<> c{clock};
1624 auto tempContainer(c);
1626 tempContainer, tempContainer.cbegin(), tempContainer.cend()))
1629 BEAST_EXPECT(tempContainer.empty());
1634 auto tempContainer(c);
1635 auto& chron(tempContainer.chronological);
1639 BEAST_EXPECT(tempContainer.empty());
1644 auto tempContainer(c);
1645 BEAST_EXPECT(tempContainer.size() > 2);
1648 ++tempContainer.begin(),
1652 BEAST_EXPECT(tempContainer.size() == 2);
1657 auto tempContainer(c);
1658 BEAST_EXPECT(tempContainer.size() > 2);
1659 auto& chron(tempContainer.chronological);
1666 BEAST_EXPECT(tempContainer.size() == 2);
1670 auto tempContainer(c);
1671 BEAST_EXPECT(tempContainer.size() > 4);
1696template <
class Container,
class BeginEndSrc>
1700 BeginEndSrc
const& beginEndSrc)
1702 BEAST_EXPECT(c.size() > 2);
1703 auto itBeginPlusOne(beginEndSrc.begin());
1704 auto const valueFront = *itBeginPlusOne;
1708 auto itBack(
nextToEndIter(itBeginPlusOne, beginEndSrc.end()));
1709 auto const valueBack = *itBack;
1712 auto const retIter = c.erase(itBeginPlusOne, itBack);
1714 BEAST_EXPECT(c.size() == 2);
1715 BEAST_EXPECT(valueFront == *(beginEndSrc.begin()));
1716 BEAST_EXPECT(valueBack == *(++beginEndSrc.begin()));
1717 BEAST_EXPECT(retIter == (++beginEndSrc.begin()));
1726template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1736 typename Traits::ManualClock clock;
1737 typename Traits::template Cont<> c{clock};
1742 auto tempContainer(c);
1746 auto tempContainer(c);
1747 doRangeErase(tempContainer, tempContainer.chronological);
1758template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1763 using Value =
typename Traits::Value;
1764 typename Traits::ManualClock clock;
1765 auto const v(Traits::values());
1770 typename Traits::template Cont<> c1(v.begin(), v.end(), clock);
1772 typename Traits::template Cont<> c2(v.begin(), v.end(), clock);
1773 c2.erase(c2.cbegin());
1790template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1795 typename Traits::ManualClock clock;
1800 typename Traits::template Cont<> c(clock);
1808template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1812 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
1813 typename Traits::ManualClock clock;
1818 typename Traits::template Cont<> c(clock);
1831template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1837 testConstructEmpty<IsUnordered, IsMulti, IsMap>();
1838 testConstructRange<IsUnordered, IsMulti, IsMap>();
1839 testConstructInitList<IsUnordered, IsMulti, IsMap>();
1840 testCopyMove<IsUnordered, IsMulti, IsMap>();
1841 testIterator<IsUnordered, IsMulti, IsMap>();
1842 testReverseIterator<IsUnordered, IsMulti, IsMap>();
1843 testModifiers<IsUnordered, IsMulti, IsMap>();
1844 testChronological<IsUnordered, IsMulti, IsMap>();
1845 testArrayCreate<IsUnordered, IsMulti, IsMap>();
1846 testElementErase<IsUnordered, IsMulti, IsMap>();
1847 testRangeErase<IsUnordered, IsMulti, IsMap>();
1848 testCompare<IsUnordered, IsMulti, IsMap>();
1849 testObservers<IsUnordered, IsMulti, IsMap>();
1866 "bad alias: aged_set");
1872 "bad alias: aged_multiset");
1878 "bad alias: aged_map");
1884 "bad alias: aged_multimap");
1890 "bad alias: aged_unordered_set");
1896 "bad alias: aged_unordered_multiset");
1902 "bad alias: aged_unordered_map");
1908 "bad alias: aged_unordered_multimap");
1913 testMaybeUnorderedMultiMap<false, false, false>();
1923 testMaybeUnorderedMultiMap<false, false, true>();
1933 testMaybeUnorderedMultiMap<false, true, false>();
1943 testMaybeUnorderedMultiMap<false, true, true>();
1953 testMaybeUnorderedMultiMap<true, false, false>();
1963 testMaybeUnorderedMultiMap<true, false, true>();
1973 testMaybeUnorderedMultiMap<true, true, false>();
1983 testMaybeUnorderedMultiMap<true, true, true>();
std::size_t operator()(T const &t) const
static std::string name_map_part()
static Base::Key const & extract(Value const &value)
static std::string name_map_part()
static Base::Key const & extract(Value const &value)
std::vector< Value > Values
static std::string name_multi_part()
static std::string name_multi_part()
static std::string name_ordered_part()
static std::string name_ordered_part()
std::enable_if< IsMap &&!IsMulti >::type testArrayCreate()
std::enable_if<!std::remove_reference< C >::type::is_unordered::value >::type checkUnorderedContentsRefRef(C &&, Values const &)
void checkInsertHintMove(Container &c, Values const &v)
void checkInsertCopy(Container &c, Values const &v)
std::enable_if<!IsUnordered >::type testReverseIterator()
std::enable_if<!(Container::is_map::value &&!Container::is_multi::value)>::type checkMapContents(Container, Values const &)
void checkInsertHintCopy(Container &c, Values const &v)
void checkContentsRefRef(C &&c, Values const &v)
void checkEmplace(Container &c, Values const &v)
static std::vector< typename Cont::value_type > make_list(Cont const &c)
std::enable_if< IsUnordered >::type testReverseIterator()
std::enable_if<!IsUnordered >::type testCompare()
std::enable_if< Container::is_map::value &&!Container::is_multi::value >::type checkMapContents(Container &c, Values const &v)
static std::string name(Cont const &)
std::enable_if<!IsUnordered >::type testConstructRange()
void testMaybeUnorderedMulti()
bool doElementErase(Container &c, Iter const beginItr, Iter const endItr)
std::enable_if< IsUnordered >::type testCompare()
std::enable_if<!IsUnordered >::type testObservers()
Iter nextToEndIter(Iter const beginIter, Iter const endItr)
void testMaybeUnorderedMultiMap()
std::enable_if<!IsUnordered >::type testConstructEmpty()
void reverseFillAgedContainer(Container &c, Values const &v)
std::enable_if< std::remove_reference< C >::type::is_unordered::value >::type checkUnorderedContentsRefRef(C &&c, Values const &v)
std::enable_if<!IsUnordered >::type testConstructInitList()
std::enable_if<!(IsMap &&!IsMulti)>::type testArrayCreate()
void testMaybeUnordered()
void checkContents(Cont &c, Values const &v)
void doRangeErase(Container &c, BeginEndSrc const &beginEndSrc)
void checkEmplaceHint(Container &c, Values const &v)
void checkInsertMove(Container &c, Values const &v)
void run() override
Runs the suite.
void run() override
Runs the suite.
void run() override
Runs the suite.
void run() override
Runs the suite.
void run() override
Runs the suite.
void run() override
Runs the suite.
void run() override
Runs the suite.
void run() override
Runs the suite.
Associative container where each element is also indexed by time.
Associative container where each element is also indexed by time.
Manual clock implementation.
void pass()
Record a successful test condition.
bool unexpected(Condition shouldBeFalse, String const &reason)
testcase_t testcase
Memberspace for declaring test cases.
bool expect(Condition const &shouldBeTrue)
Evaluate a test condition.
void fail(String const &reason, char const *file, int line)
Record a failure.
T * allocate(std::size_t n, T const *=0)
AllocT(AllocT< U > const &)
void deallocate(T *p, std::size_t)
bool operator==(AllocT< U > const &) const
bool operator!=(AllocT< U > const &o) const
AllocT(AllocT const &)=default
bool operator()(T const &lhs, T const &rhs) const
bool operator()(T const &lhs, T const &rhs) const
manual_clock< Clock > ManualClock
static std::string name()
bool operator()(typename Traits::Value const &lhs, typename Traits::Value const &rhs)