20#include <xrpl/beast/clock/manual_clock.h>
21#include <xrpl/beast/unit_test.h>
23#include <xrpl/beast/container/aged_map.h>
24#include <xrpl/beast/container/aged_multimap.h>
25#include <xrpl/beast/container/aged_multiset.h>
26#include <xrpl/beast/container/aged_set.h>
27#include <xrpl/beast/container/aged_unordered_map.h>
28#include <xrpl/beast/container/aged_unordered_multimap.h>
29#include <xrpl/beast/container/aged_unordered_multiset.h>
30#include <xrpl/beast/container/aged_unordered_set.h>
35#ifndef BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR
37#define BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR 0
39#define BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR 1
43#ifndef BEAST_CONTAINER_EXTRACT_NOREF
45#define BEAST_CONTAINER_EXTRACT_NOREF 1
47#define BEAST_CONTAINER_EXTRACT_NOREF 1
108 return m_eq(lhs, rhs);
151 return !(*
this == o);
157 return static_cast<T*
>(::operator
new(n *
sizeof(T)));
163 ::operator
delete(p);
166#if !BEAST_AGED_UNORDERED_NO_ALLOC_DEFAULTCTOR
179 template <
class Base,
bool IsUnordered>
195 template <
class Base>
213 template <
class Base,
bool IsMulti>
226 template <
class Base>
239 template <
class Base,
bool IsMap>
247 static typename Base::Key
const&
275 template <
class Base>
283 static typename Base::Key
const&
312 template <
class Base,
bool IsUnordered = Base::is_unordered::value>
319 Base::is_multi::value,
323 typename Base::Clock,
329 template <
class Base>
337 Base::is_multi::value,
341 typename Base::Clock,
356 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
359 MaybeMulti<MaybeMap<TestTraitsBase, IsMap>, IsMulti>,
385 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
387 ContType<TestTraitsHelper<IsUnordered, IsMulti, IsMap>>
391 template <
class Cont>
399 template <
class Traits>
404 typename Traits::Value
const& lhs,
405 typename Traits::Value
const& rhs)
407 return Traits::extract(lhs) == Traits::extract(rhs);
411 template <
class Cont>
420 template <
class Container,
class Values>
422 Container::is_map::value && !Container::is_multi::value>::type
425 template <
class Container,
class Values>
427 !(Container::is_map::value && !Container::is_multi::value)>::type
433 template <
class C,
class Values>
438 template <
class C,
class Values>
445 template <
class C,
class Values>
449 template <
class Cont,
class Values>
453 template <
class Cont>
460 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
465 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
470 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
475 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
480 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
485 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
491 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
497 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
502 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
506 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
514 template <
class Container,
class Values>
518 template <
class Container,
class Values>
522 template <
class Container,
class Values>
526 template <
class Container,
class Values>
530 template <
class Container,
class Values>
534 template <
class Container,
class Values>
538 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
544 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
551 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
555 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
564 template <
class Container,
class Values>
568 template <
class Iter>
574 template <
class Container,
class Iter>
576 doElementErase(Container& c, Iter
const beginItr, Iter
const endItr);
578 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
584 template <
class Container,
class BeginEndSrc>
586 doRangeErase(Container& c, BeginEndSrc
const& beginEndSrc);
588 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
595 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
599 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
608 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
613 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
619 template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
623 template <
bool IsUnordered,
bool IsMulti>
627 template <
bool IsUnordered>
636template <
class Container,
class Values>
638 Container::is_map::value && !Container::is_multi::value>::type
645 BEAST_EXPECT(c.empty());
646 BEAST_EXPECT(c.size() == 0);
653 for (
auto const& e : v)
655 for (
auto const& e : v)
656 BEAST_EXPECT(c.operator[](e.first) == e.second);
660 fail(
"caught exception");
665template <
class C,
class Values>
674 Cont::is_unordered::value,
675 Cont::is_multi::value,
676 Cont::is_map::value>;
677 using size_type =
typename Cont::size_type;
678 auto const hash(c.hash_function());
679 auto const key_eq(c.key_eq());
680 for (size_type i(0); i < c.bucket_count(); ++i)
682 auto const last(c.end(i));
683 for (
auto iter(c.begin(i)); iter != last; ++iter)
688 [iter](
typename Values::value_type
const& e) {
689 return Traits::extract(*iter) == Traits::extract(e);
691 BEAST_EXPECT(match != v.end());
693 key_eq(Traits::extract(*iter), Traits::extract(*match)));
695 hash(Traits::extract(*iter)) == hash(Traits::extract(*match)));
700template <
class C,
class Values>
708 Cont::is_unordered::value,
709 Cont::is_multi::value,
710 Cont::is_map::value>;
711 using size_type =
typename Cont::size_type;
713 BEAST_EXPECT(c.size() == v.size());
714 BEAST_EXPECT(size_type(
std::distance(c.begin(), c.end())) == v.size());
715 BEAST_EXPECT(size_type(
std::distance(c.cbegin(), c.cend())) == v.size());
718 c.chronological.begin(), c.chronological.end())) == v.size());
721 c.chronological.cbegin(), c.chronological.cend())) == v.size());
724 c.chronological.rbegin(), c.chronological.rend())) == v.size());
727 c.chronological.crbegin(), c.chronological.crend())) == v.size());
732template <
class Cont,
class Values>
746 Cont::is_unordered::value,
747 Cont::is_multi::value,
748 Cont::is_map::value>;
749 using Values =
typename Traits::Values;
760template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
765 using Value =
typename Traits::Value;
766 using Key =
typename Traits::Key;
767 using T =
typename Traits::T;
768 using Clock =
typename Traits::Clock;
769 using Comp =
typename Traits::Comp;
770 using Alloc =
typename Traits::Alloc;
771 using MyComp =
typename Traits::MyComp;
772 using MyAlloc =
typename Traits::MyAlloc;
773 typename Traits::ManualClock clock;
779 typename Traits::template Cont<Comp, Alloc> c(clock);
784 typename Traits::template Cont<MyComp, Alloc> c(clock, MyComp(1));
789 typename Traits::template Cont<Comp, MyAlloc> c(clock, MyAlloc(1));
794 typename Traits::template Cont<MyComp, MyAlloc> c(
795 clock, MyComp(1), MyAlloc(1));
801template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
805 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
806 using Value =
typename Traits::Value;
807 using Key =
typename Traits::Key;
808 using T =
typename Traits::T;
809 using Clock =
typename Traits::Clock;
810 using Hash =
typename Traits::Hash;
811 using Equal =
typename Traits::Equal;
812 using Alloc =
typename Traits::Alloc;
813 using MyHash =
typename Traits::MyHash;
814 using MyEqual =
typename Traits::MyEqual;
815 using MyAlloc =
typename Traits::MyAlloc;
816 typename Traits::ManualClock clock;
821 typename Traits::template Cont<Hash, Equal, Alloc> c(clock);
826 typename Traits::template Cont<MyHash, Equal, Alloc> c(
832 typename Traits::template Cont<Hash, MyEqual, Alloc> c(
838 typename Traits::template Cont<Hash, Equal, MyAlloc> c(
844 typename Traits::template Cont<MyHash, MyEqual, Alloc> c(
845 clock, MyHash(1), MyEqual(1));
850 typename Traits::template Cont<MyHash, Equal, MyAlloc> c(
851 clock, MyHash(1), MyAlloc(1));
856 typename Traits::template Cont<Hash, MyEqual, MyAlloc> c(
857 clock, MyEqual(1), MyAlloc(1));
862 typename Traits::template Cont<MyHash, MyEqual, MyAlloc> c(
863 clock, MyHash(1), MyEqual(1), MyAlloc(1));
869template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
874 using Value =
typename Traits::Value;
875 using Key =
typename Traits::Key;
876 using T =
typename Traits::T;
877 using Clock =
typename Traits::Clock;
878 using Comp =
typename Traits::Comp;
879 using Alloc =
typename Traits::Alloc;
880 using MyComp =
typename Traits::MyComp;
881 using MyAlloc =
typename Traits::MyAlloc;
882 typename Traits::ManualClock clock;
883 auto const v(Traits::values());
889 typename Traits::template Cont<Comp, Alloc> c(
890 v.begin(), v.end(), clock);
895 typename Traits::template Cont<MyComp, Alloc> c(
896 v.begin(), v.end(), clock, MyComp(1));
901 typename Traits::template Cont<Comp, MyAlloc> c(
902 v.begin(), v.end(), clock, MyAlloc(1));
907 typename Traits::template Cont<MyComp, MyAlloc> c(
908 v.begin(), v.end(), clock, MyComp(1), MyAlloc(1));
915 typename Traits::template Cont<Comp, Alloc> c1(
916 v.begin(), v.end(), clock);
917 typename Traits::template Cont<Comp, Alloc> c2(clock);
924template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
928 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
929 using Value =
typename Traits::Value;
930 using Key =
typename Traits::Key;
931 using T =
typename Traits::T;
932 using Clock =
typename Traits::Clock;
933 using Hash =
typename Traits::Hash;
934 using Equal =
typename Traits::Equal;
935 using Alloc =
typename Traits::Alloc;
936 using MyHash =
typename Traits::MyHash;
937 using MyEqual =
typename Traits::MyEqual;
938 using MyAlloc =
typename Traits::MyAlloc;
939 typename Traits::ManualClock clock;
940 auto const v(Traits::values());
946 typename Traits::template Cont<Hash, Equal, Alloc> c(
947 v.begin(), v.end(), clock);
952 typename Traits::template Cont<MyHash, Equal, Alloc> c(
953 v.begin(), v.end(), clock, MyHash(1));
958 typename Traits::template Cont<Hash, MyEqual, Alloc> c(
959 v.begin(), v.end(), clock, MyEqual(1));
964 typename Traits::template Cont<Hash, Equal, MyAlloc> c(
965 v.begin(), v.end(), clock, MyAlloc(1));
970 typename Traits::template Cont<MyHash, MyEqual, Alloc> c(
971 v.begin(), v.end(), clock, MyHash(1), MyEqual(1));
976 typename Traits::template Cont<MyHash, Equal, MyAlloc> c(
977 v.begin(), v.end(), clock, MyHash(1), MyAlloc(1));
982 typename Traits::template Cont<Hash, MyEqual, MyAlloc> c(
983 v.begin(), v.end(), clock, MyEqual(1), MyAlloc(1));
988 typename Traits::template Cont<MyHash, MyEqual, MyAlloc> c(
989 v.begin(), v.end(), clock, MyHash(1), MyEqual(1), MyAlloc(1));
995template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1000 using Value =
typename Traits::Value;
1001 using Key =
typename Traits::Key;
1002 using T =
typename Traits::T;
1003 using Clock =
typename Traits::Clock;
1004 using Comp =
typename Traits::Comp;
1005 using Alloc =
typename Traits::Alloc;
1006 using MyComp =
typename Traits::MyComp;
1007 using MyAlloc =
typename Traits::MyAlloc;
1008 typename Traits::ManualClock clock;
1019template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1023 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
1024 using Value =
typename Traits::Value;
1025 using Key =
typename Traits::Key;
1026 using T =
typename Traits::T;
1027 using Clock =
typename Traits::Clock;
1028 using Hash =
typename Traits::Hash;
1029 using Equal =
typename Traits::Equal;
1030 using Alloc =
typename Traits::Alloc;
1031 using MyHash =
typename Traits::MyHash;
1032 using MyEqual =
typename Traits::MyEqual;
1033 using MyAlloc =
typename Traits::MyAlloc;
1034 typename Traits::ManualClock clock;
1049template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1054 using Value =
typename Traits::Value;
1055 using Alloc =
typename Traits::Alloc;
1056 typename Traits::ManualClock clock;
1057 auto const v(Traits::values());
1065 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1066 typename Traits::template Cont<> c2(c);
1069 BEAST_EXPECT(c == c2);
1074 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1075 typename Traits::template Cont<> c2(c, Alloc());
1078 BEAST_EXPECT(c == c2);
1083 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1084 typename Traits::template Cont<> c2(clock);
1088 BEAST_EXPECT(c == c2);
1095 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1096 typename Traits::template Cont<> c2(std::move(c));
1101 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1102 typename Traits::template Cont<> c2(std::move(c), Alloc());
1107 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1108 typename Traits::template Cont<> c2(clock);
1120template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1125 using Value =
typename Traits::Value;
1126 using Alloc =
typename Traits::Alloc;
1127 typename Traits::ManualClock clock;
1128 auto const v(Traits::values());
1133 typename Traits::template Cont<> c{clock};
1135 using iterator =
decltype(c.begin());
1136 using const_iterator =
decltype(c.cbegin());
1139 iterator nnIt_0{c.begin()};
1140 iterator nnIt_1{nnIt_0};
1141 BEAST_EXPECT(nnIt_0 == nnIt_1);
1144 BEAST_EXPECT(nnIt_1 == nnIt_2);
1148 const_iterator ccIt_0{c.cbegin()};
1149 const_iterator ccIt_1{ccIt_0};
1150 BEAST_EXPECT(ccIt_0 == ccIt_1);
1151 const_iterator ccIt_2;
1153 BEAST_EXPECT(ccIt_1 == ccIt_2);
1156 BEAST_EXPECT(nnIt_0 == ccIt_0);
1157 BEAST_EXPECT(ccIt_1 == nnIt_1);
1160 const_iterator ncIt_3{c.begin()};
1161 const_iterator ncIt_4{nnIt_0};
1162 BEAST_EXPECT(ncIt_3 == ncIt_4);
1163 const_iterator ncIt_5;
1165 BEAST_EXPECT(ncIt_5 == ncIt_4);
1178template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1183 using Value =
typename Traits::Value;
1184 using Alloc =
typename Traits::Alloc;
1185 typename Traits::ManualClock clock;
1186 auto const v(Traits::values());
1191 typename Traits::template Cont<> c{clock};
1193 using iterator =
decltype(c.begin());
1194 using const_iterator =
decltype(c.cbegin());
1195 using reverse_iterator =
decltype(c.rbegin());
1196 using const_reverse_iterator =
decltype(c.crbegin());
1207 reverse_iterator rNrNit_0{c.rbegin()};
1208 reverse_iterator rNrNit_1{rNrNit_0};
1209 BEAST_EXPECT(rNrNit_0 == rNrNit_1);
1210 reverse_iterator xXrNit_2;
1211 xXrNit_2 = rNrNit_1;
1212 BEAST_EXPECT(rNrNit_1 == xXrNit_2);
1216 const_reverse_iterator rCrCit_0{c.crbegin()};
1217 const_reverse_iterator rCrCit_1{rCrCit_0};
1218 BEAST_EXPECT(rCrCit_0 == rCrCit_1);
1219 const_reverse_iterator xXrCit_2;
1220 xXrCit_2 = rCrCit_1;
1221 BEAST_EXPECT(rCrCit_1 == xXrCit_2);
1224 BEAST_EXPECT(rNrNit_0 == rCrCit_0);
1225 BEAST_EXPECT(rCrCit_1 == rNrNit_1);
1229 const_reverse_iterator rNrCit_0{c.rbegin()};
1230 const_reverse_iterator rNrCit_1{rNrNit_0};
1231 BEAST_EXPECT(rNrCit_0 == rNrCit_1);
1232 xXrCit_2 = rNrNit_1;
1233 BEAST_EXPECT(rNrCit_1 == xXrCit_2);
1241 reverse_iterator fNrNit_0{c.begin()};
1242 const_reverse_iterator fNrCit_0{c.begin()};
1243 BEAST_EXPECT(fNrNit_0 == fNrCit_0);
1244 const_reverse_iterator fCrCit_0{c.cbegin()};
1245 BEAST_EXPECT(fNrCit_0 == fCrCit_0);
1266template <
class Container,
class Values>
1272 for (
auto const& e : v)
1277template <
class Container,
class Values>
1285 c.insert(std::move(e));
1289template <
class Container,
class Values>
1295 for (
auto const& e : v)
1296 c.insert(c.cend(), e);
1300template <
class Container,
class Values>
1308 c.insert(c.cend(), std::move(e));
1312template <
class Container,
class Values>
1318 for (
auto const& e : v)
1323template <
class Container,
class Values>
1329 for (
auto const& e : v)
1330 c.emplace_hint(c.cend(), e);
1334template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1339 typename Traits::ManualClock clock;
1340 auto const v(Traits::values());
1347 typename Traits::template Cont<> c(clock);
1352 typename Traits::template Cont<> c(clock);
1357 typename Traits::template Cont<> c(clock);
1362 typename Traits::template Cont<> c(clock);
1367 typename Traits::template Cont<> c(clock);
1372 typename Traits::template Cont<> c(clock);
1377 typename Traits::template Cont<> c(clock);
1382 typename Traits::template Cont<> c(clock);
1393template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1398 using Value =
typename Traits::Value;
1399 typename Traits::ManualClock clock;
1400 auto const v(Traits::values());
1405 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1408 c.chronological.cbegin(),
1409 c.chronological.cend(),
1415 for (
auto iter(v.crbegin()); iter != v.crend(); ++iter)
1417 using iterator =
typename decltype(c)::iterator;
1418 iterator found(c.find(Traits::extract(*iter)));
1420 BEAST_EXPECT(found != c.cend());
1421 if (found == c.cend())
1427 c.chronological.cbegin(),
1428 c.chronological.cend(),
1434 for (
auto iter(v.cbegin()); iter != v.cend(); ++iter)
1436 using const_iterator =
typename decltype(c)::const_iterator;
1437 const_iterator found(c.find(Traits::extract(*iter)));
1439 BEAST_EXPECT(found != c.cend());
1440 if (found == c.cend())
1446 c.chronological.cbegin(),
1447 c.chronological.cend(),
1467template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1472 typename Traits::ManualClock clock;
1473 auto v(Traits::values());
1480 typename Traits::template Cont<> c(clock);
1482 c[e.first] = e.second;
1488 typename Traits::template Cont<> c(clock);
1490 c[std::move(e.first)] = e.second;
1501template <
class Container,
class Values>
1505 Values
const& values)
1513 ManualClock& clk(
dynamic_cast<ManualClock&
>(c.clock()));
1529template <
class Iter>
1535 if (beginIter == endIter)
1537 fail(
"Internal test failure. Cannot advance beginIter");
1542 Iter nextToEnd = beginIter;
1545 nextToEnd = beginIter++;
1546 }
while (beginIter != endIter);
1563template <
class Container,
class Iter>
1567 Iter
const beginItr,
1571 size_t count = c.size();
1572 while (it != endItr)
1580 fail(
"Unexpected returned iterator from element erase");
1585 if (count != c.size())
1587 fail(
"Failed to erase element");
1595 fail(
"Erase of last element didn't produce end");
1609template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1619 typename Traits::ManualClock clock;
1620 typename Traits::template Cont<> c{clock};
1625 auto tempContainer(c);
1627 tempContainer, tempContainer.cbegin(), tempContainer.cend()))
1630 BEAST_EXPECT(tempContainer.empty());
1635 auto tempContainer(c);
1636 auto& chron(tempContainer.chronological);
1640 BEAST_EXPECT(tempContainer.empty());
1645 auto tempContainer(c);
1646 BEAST_EXPECT(tempContainer.size() > 2);
1649 ++tempContainer.begin(),
1653 BEAST_EXPECT(tempContainer.size() == 2);
1658 auto tempContainer(c);
1659 BEAST_EXPECT(tempContainer.size() > 2);
1660 auto& chron(tempContainer.chronological);
1667 BEAST_EXPECT(tempContainer.size() == 2);
1671 auto tempContainer(c);
1672 BEAST_EXPECT(tempContainer.size() > 4);
1697template <
class Container,
class BeginEndSrc>
1701 BeginEndSrc
const& beginEndSrc)
1703 BEAST_EXPECT(c.size() > 2);
1704 auto itBeginPlusOne(beginEndSrc.begin());
1705 auto const valueFront = *itBeginPlusOne;
1709 auto itBack(
nextToEndIter(itBeginPlusOne, beginEndSrc.end()));
1710 auto const valueBack = *itBack;
1713 auto const retIter = c.erase(itBeginPlusOne, itBack);
1715 BEAST_EXPECT(c.size() == 2);
1716 BEAST_EXPECT(valueFront == *(beginEndSrc.begin()));
1717 BEAST_EXPECT(valueBack == *(++beginEndSrc.begin()));
1718 BEAST_EXPECT(retIter == (++beginEndSrc.begin()));
1727template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1737 typename Traits::ManualClock clock;
1738 typename Traits::template Cont<> c{clock};
1743 auto tempContainer(c);
1747 auto tempContainer(c);
1748 doRangeErase(tempContainer, tempContainer.chronological);
1759template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1764 using Value =
typename Traits::Value;
1765 typename Traits::ManualClock clock;
1766 auto const v(Traits::values());
1771 typename Traits::template Cont<> c1(v.begin(), v.end(), clock);
1773 typename Traits::template Cont<> c2(v.begin(), v.end(), clock);
1774 c2.erase(c2.cbegin());
1791template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1796 typename Traits::ManualClock clock;
1801 typename Traits::template Cont<> c(clock);
1809template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1813 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
1814 typename Traits::ManualClock clock;
1819 typename Traits::template Cont<> c(clock);
1832template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1838 testConstructEmpty<IsUnordered, IsMulti, IsMap>();
1839 testConstructRange<IsUnordered, IsMulti, IsMap>();
1840 testConstructInitList<IsUnordered, IsMulti, IsMap>();
1841 testCopyMove<IsUnordered, IsMulti, IsMap>();
1842 testIterator<IsUnordered, IsMulti, IsMap>();
1843 testReverseIterator<IsUnordered, IsMulti, IsMap>();
1844 testModifiers<IsUnordered, IsMulti, IsMap>();
1845 testChronological<IsUnordered, IsMulti, IsMap>();
1846 testArrayCreate<IsUnordered, IsMulti, IsMap>();
1847 testElementErase<IsUnordered, IsMulti, IsMap>();
1848 testRangeErase<IsUnordered, IsMulti, IsMap>();
1849 testCompare<IsUnordered, IsMulti, IsMap>();
1850 testObservers<IsUnordered, IsMulti, IsMap>();
1867 "bad alias: aged_set");
1873 "bad alias: aged_multiset");
1879 "bad alias: aged_map");
1885 "bad alias: aged_multimap");
1891 "bad alias: aged_unordered_set");
1897 "bad alias: aged_unordered_multiset");
1903 "bad alias: aged_unordered_map");
1909 "bad alias: aged_unordered_multimap");
1914 testMaybeUnorderedMultiMap<false, false, false>();
1924 testMaybeUnorderedMultiMap<false, false, true>();
1934 testMaybeUnorderedMultiMap<false, true, false>();
1944 testMaybeUnorderedMultiMap<false, true, true>();
1954 testMaybeUnorderedMultiMap<true, false, false>();
1964 testMaybeUnorderedMultiMap<true, false, true>();
1974 testMaybeUnorderedMultiMap<true, true, false>();
1984 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)