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>
706 using size_type =
typename Cont::size_type;
708 BEAST_EXPECT(c.size() == v.size());
709 BEAST_EXPECT(size_type(
std::distance(c.begin(), c.end())) == v.size());
710 BEAST_EXPECT(size_type(
std::distance(c.cbegin(), c.cend())) == v.size());
713 c.chronological.begin(), c.chronological.end())) == v.size());
716 c.chronological.cbegin(), c.chronological.cend())) == v.size());
719 c.chronological.rbegin(), c.chronological.rend())) == v.size());
722 c.chronological.crbegin(), c.chronological.crend())) == v.size());
727template <
class Cont,
class Values>
741 Cont::is_unordered::value,
742 Cont::is_multi::value,
743 Cont::is_map::value>;
744 using Values =
typename Traits::Values;
755template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
760 using Comp =
typename Traits::Comp;
761 using Alloc =
typename Traits::Alloc;
762 using MyComp =
typename Traits::MyComp;
763 using MyAlloc =
typename Traits::MyAlloc;
764 typename Traits::ManualClock clock;
770 typename Traits::template Cont<Comp, Alloc> c(clock);
775 typename Traits::template Cont<MyComp, Alloc> c(clock, MyComp(1));
780 typename Traits::template Cont<Comp, MyAlloc> c(clock, MyAlloc(1));
785 typename Traits::template Cont<MyComp, MyAlloc> c(
786 clock, MyComp(1), MyAlloc(1));
792template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
796 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
797 using Hash =
typename Traits::Hash;
798 using Equal =
typename Traits::Equal;
799 using Alloc =
typename Traits::Alloc;
800 using MyHash =
typename Traits::MyHash;
801 using MyEqual =
typename Traits::MyEqual;
802 using MyAlloc =
typename Traits::MyAlloc;
803 typename Traits::ManualClock clock;
808 typename Traits::template Cont<Hash, Equal, Alloc> c(clock);
813 typename Traits::template Cont<MyHash, Equal, Alloc> c(
819 typename Traits::template Cont<Hash, MyEqual, Alloc> c(
825 typename Traits::template Cont<Hash, Equal, MyAlloc> c(
831 typename Traits::template Cont<MyHash, MyEqual, Alloc> c(
832 clock, MyHash(1), MyEqual(1));
837 typename Traits::template Cont<MyHash, Equal, MyAlloc> c(
838 clock, MyHash(1), MyAlloc(1));
843 typename Traits::template Cont<Hash, MyEqual, MyAlloc> c(
844 clock, MyEqual(1), MyAlloc(1));
849 typename Traits::template Cont<MyHash, MyEqual, MyAlloc> c(
850 clock, MyHash(1), MyEqual(1), MyAlloc(1));
856template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
861 using Comp =
typename Traits::Comp;
862 using Alloc =
typename Traits::Alloc;
863 using MyComp =
typename Traits::MyComp;
864 using MyAlloc =
typename Traits::MyAlloc;
865 typename Traits::ManualClock clock;
866 auto const v(Traits::values());
872 typename Traits::template Cont<Comp, Alloc> c(
873 v.begin(), v.end(), clock);
878 typename Traits::template Cont<MyComp, Alloc> c(
879 v.begin(), v.end(), clock, MyComp(1));
884 typename Traits::template Cont<Comp, MyAlloc> c(
885 v.begin(), v.end(), clock, MyAlloc(1));
890 typename Traits::template Cont<MyComp, MyAlloc> c(
891 v.begin(), v.end(), clock, MyComp(1), MyAlloc(1));
898 typename Traits::template Cont<Comp, Alloc> c1(
899 v.begin(), v.end(), clock);
900 typename Traits::template Cont<Comp, Alloc> c2(clock);
907template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
911 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
912 using Hash =
typename Traits::Hash;
913 using Equal =
typename Traits::Equal;
914 using Alloc =
typename Traits::Alloc;
915 using MyHash =
typename Traits::MyHash;
916 using MyEqual =
typename Traits::MyEqual;
917 using MyAlloc =
typename Traits::MyAlloc;
918 typename Traits::ManualClock clock;
919 auto const v(Traits::values());
925 typename Traits::template Cont<Hash, Equal, Alloc> c(
926 v.begin(), v.end(), clock);
931 typename Traits::template Cont<MyHash, Equal, Alloc> c(
932 v.begin(), v.end(), clock, MyHash(1));
937 typename Traits::template Cont<Hash, MyEqual, Alloc> c(
938 v.begin(), v.end(), clock, MyEqual(1));
943 typename Traits::template Cont<Hash, Equal, MyAlloc> c(
944 v.begin(), v.end(), clock, MyAlloc(1));
949 typename Traits::template Cont<MyHash, MyEqual, Alloc> c(
950 v.begin(), v.end(), clock, MyHash(1), MyEqual(1));
955 typename Traits::template Cont<MyHash, Equal, MyAlloc> c(
956 v.begin(), v.end(), clock, MyHash(1), MyAlloc(1));
961 typename Traits::template Cont<Hash, MyEqual, MyAlloc> c(
962 v.begin(), v.end(), clock, MyEqual(1), MyAlloc(1));
967 typename Traits::template Cont<MyHash, MyEqual, MyAlloc> c(
968 v.begin(), v.end(), clock, MyHash(1), MyEqual(1), MyAlloc(1));
974template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
979 typename Traits::ManualClock clock;
990template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
994 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
995 typename Traits::ManualClock clock;
1010template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1015 using Alloc =
typename Traits::Alloc;
1016 typename Traits::ManualClock clock;
1017 auto const v(Traits::values());
1025 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1026 typename Traits::template Cont<> c2(c);
1029 BEAST_EXPECT(c == c2);
1034 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1035 typename Traits::template Cont<> c2(c, Alloc());
1038 BEAST_EXPECT(c == c2);
1043 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1044 typename Traits::template Cont<> c2(clock);
1048 BEAST_EXPECT(c == c2);
1055 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1056 typename Traits::template Cont<> c2(std::move(c));
1061 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1062 typename Traits::template Cont<> c2(std::move(c), Alloc());
1067 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1068 typename Traits::template Cont<> c2(clock);
1080template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1085 typename Traits::ManualClock clock;
1086 auto const v(Traits::values());
1091 typename Traits::template Cont<> c{clock};
1093 using iterator =
decltype(c.begin());
1094 using const_iterator =
decltype(c.cbegin());
1097 iterator nnIt_0{c.begin()};
1098 iterator nnIt_1{nnIt_0};
1099 BEAST_EXPECT(nnIt_0 == nnIt_1);
1102 BEAST_EXPECT(nnIt_1 == nnIt_2);
1106 const_iterator ccIt_0{c.cbegin()};
1107 const_iterator ccIt_1{ccIt_0};
1108 BEAST_EXPECT(ccIt_0 == ccIt_1);
1109 const_iterator ccIt_2;
1111 BEAST_EXPECT(ccIt_1 == ccIt_2);
1114 BEAST_EXPECT(nnIt_0 == ccIt_0);
1115 BEAST_EXPECT(ccIt_1 == nnIt_1);
1118 const_iterator ncIt_3{c.begin()};
1119 const_iterator ncIt_4{nnIt_0};
1120 BEAST_EXPECT(ncIt_3 == ncIt_4);
1121 const_iterator ncIt_5;
1123 BEAST_EXPECT(ncIt_5 == ncIt_4);
1136template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1141 typename Traits::ManualClock clock;
1142 auto const v(Traits::values());
1147 typename Traits::template Cont<> c{clock};
1149 using iterator =
decltype(c.begin());
1150 using reverse_iterator =
decltype(c.rbegin());
1151 using const_reverse_iterator =
decltype(c.crbegin());
1162 reverse_iterator rNrNit_0{c.rbegin()};
1163 reverse_iterator rNrNit_1{rNrNit_0};
1164 BEAST_EXPECT(rNrNit_0 == rNrNit_1);
1165 reverse_iterator xXrNit_2;
1166 xXrNit_2 = rNrNit_1;
1167 BEAST_EXPECT(rNrNit_1 == xXrNit_2);
1171 const_reverse_iterator rCrCit_0{c.crbegin()};
1172 const_reverse_iterator rCrCit_1{rCrCit_0};
1173 BEAST_EXPECT(rCrCit_0 == rCrCit_1);
1174 const_reverse_iterator xXrCit_2;
1175 xXrCit_2 = rCrCit_1;
1176 BEAST_EXPECT(rCrCit_1 == xXrCit_2);
1179 BEAST_EXPECT(rNrNit_0 == rCrCit_0);
1180 BEAST_EXPECT(rCrCit_1 == rNrNit_1);
1184 const_reverse_iterator rNrCit_0{c.rbegin()};
1185 const_reverse_iterator rNrCit_1{rNrNit_0};
1186 BEAST_EXPECT(rNrCit_0 == rNrCit_1);
1187 xXrCit_2 = rNrNit_1;
1188 BEAST_EXPECT(rNrCit_1 == xXrCit_2);
1196 reverse_iterator fNrNit_0{c.begin()};
1197 const_reverse_iterator fNrCit_0{c.begin()};
1198 BEAST_EXPECT(fNrNit_0 == fNrCit_0);
1199 const_reverse_iterator fCrCit_0{c.cbegin()};
1200 BEAST_EXPECT(fNrCit_0 == fCrCit_0);
1221template <
class Container,
class Values>
1227 for (
auto const& e : v)
1232template <
class Container,
class Values>
1240 c.insert(std::move(e));
1244template <
class Container,
class Values>
1250 for (
auto const& e : v)
1251 c.insert(c.cend(), e);
1255template <
class Container,
class Values>
1263 c.insert(c.cend(), std::move(e));
1267template <
class Container,
class Values>
1273 for (
auto const& e : v)
1278template <
class Container,
class Values>
1284 for (
auto const& e : v)
1285 c.emplace_hint(c.cend(), e);
1289template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1294 typename Traits::ManualClock clock;
1295 auto const v(Traits::values());
1302 typename Traits::template Cont<> c(clock);
1307 typename Traits::template Cont<> c(clock);
1312 typename Traits::template Cont<> c(clock);
1317 typename Traits::template Cont<> c(clock);
1322 typename Traits::template Cont<> c(clock);
1327 typename Traits::template Cont<> c(clock);
1332 typename Traits::template Cont<> c(clock);
1337 typename Traits::template Cont<> c(clock);
1348template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1353 typename Traits::ManualClock clock;
1354 auto const v(Traits::values());
1359 typename Traits::template Cont<> c(v.begin(), v.end(), clock);
1362 c.chronological.cbegin(),
1363 c.chronological.cend(),
1369 for (
auto iter(v.crbegin()); iter != v.crend(); ++iter)
1371 using iterator =
typename decltype(c)::iterator;
1372 iterator found(c.find(Traits::extract(*iter)));
1374 BEAST_EXPECT(found != c.cend());
1375 if (found == c.cend())
1381 c.chronological.cbegin(),
1382 c.chronological.cend(),
1388 for (
auto iter(v.cbegin()); iter != v.cend(); ++iter)
1390 using const_iterator =
typename decltype(c)::const_iterator;
1391 const_iterator found(c.find(Traits::extract(*iter)));
1393 BEAST_EXPECT(found != c.cend());
1394 if (found == c.cend())
1400 c.chronological.cbegin(),
1401 c.chronological.cend(),
1421template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1426 typename Traits::ManualClock clock;
1427 auto v(Traits::values());
1434 typename Traits::template Cont<> c(clock);
1436 c[e.first] = e.second;
1442 typename Traits::template Cont<> c(clock);
1444 c[std::move(e.first)] = e.second;
1455template <
class Container,
class Values>
1459 Values
const& values)
1467 ManualClock& clk(
dynamic_cast<ManualClock&
>(c.clock()));
1483template <
class Iter>
1489 if (beginIter == endIter)
1491 fail(
"Internal test failure. Cannot advance beginIter");
1496 Iter nextToEnd = beginIter;
1499 nextToEnd = beginIter++;
1500 }
while (beginIter != endIter);
1517template <
class Container,
class Iter>
1521 Iter
const beginItr,
1525 size_t count = c.size();
1526 while (it != endItr)
1534 fail(
"Unexpected returned iterator from element erase");
1539 if (count != c.size())
1541 fail(
"Failed to erase element");
1549 fail(
"Erase of last element didn't produce end");
1563template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1573 typename Traits::ManualClock clock;
1574 typename Traits::template Cont<> c{clock};
1579 auto tempContainer(c);
1581 tempContainer, tempContainer.cbegin(), tempContainer.cend()))
1584 BEAST_EXPECT(tempContainer.empty());
1589 auto tempContainer(c);
1590 auto& chron(tempContainer.chronological);
1594 BEAST_EXPECT(tempContainer.empty());
1599 auto tempContainer(c);
1600 BEAST_EXPECT(tempContainer.size() > 2);
1603 ++tempContainer.begin(),
1607 BEAST_EXPECT(tempContainer.size() == 2);
1612 auto tempContainer(c);
1613 BEAST_EXPECT(tempContainer.size() > 2);
1614 auto& chron(tempContainer.chronological);
1621 BEAST_EXPECT(tempContainer.size() == 2);
1625 auto tempContainer(c);
1626 BEAST_EXPECT(tempContainer.size() > 4);
1651template <
class Container,
class BeginEndSrc>
1655 BeginEndSrc
const& beginEndSrc)
1657 BEAST_EXPECT(c.size() > 2);
1658 auto itBeginPlusOne(beginEndSrc.begin());
1659 auto const valueFront = *itBeginPlusOne;
1663 auto itBack(
nextToEndIter(itBeginPlusOne, beginEndSrc.end()));
1664 auto const valueBack = *itBack;
1667 auto const retIter = c.erase(itBeginPlusOne, itBack);
1669 BEAST_EXPECT(c.size() == 2);
1670 BEAST_EXPECT(valueFront == *(beginEndSrc.begin()));
1671 BEAST_EXPECT(valueBack == *(++beginEndSrc.begin()));
1672 BEAST_EXPECT(retIter == (++beginEndSrc.begin()));
1681template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1691 typename Traits::ManualClock clock;
1692 typename Traits::template Cont<> c{clock};
1697 auto tempContainer(c);
1701 auto tempContainer(c);
1702 doRangeErase(tempContainer, tempContainer.chronological);
1713template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1718 typename Traits::ManualClock clock;
1719 auto const v(Traits::values());
1724 typename Traits::template Cont<> c1(v.begin(), v.end(), clock);
1726 typename Traits::template Cont<> c2(v.begin(), v.end(), clock);
1727 c2.erase(c2.cbegin());
1744template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1749 typename Traits::ManualClock clock;
1754 typename Traits::template Cont<> c(clock);
1762template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1766 using Traits = TestTraits<IsUnordered, IsMulti, IsMap>;
1767 typename Traits::ManualClock clock;
1772 typename Traits::template Cont<> c(clock);
1785template <
bool IsUnordered,
bool IsMulti,
bool IsMap>
1789 testConstructEmpty<IsUnordered, IsMulti, IsMap>();
1790 testConstructRange<IsUnordered, IsMulti, IsMap>();
1791 testConstructInitList<IsUnordered, IsMulti, IsMap>();
1792 testCopyMove<IsUnordered, IsMulti, IsMap>();
1793 testIterator<IsUnordered, IsMulti, IsMap>();
1794 testReverseIterator<IsUnordered, IsMulti, IsMap>();
1795 testModifiers<IsUnordered, IsMulti, IsMap>();
1796 testChronological<IsUnordered, IsMulti, IsMap>();
1797 testArrayCreate<IsUnordered, IsMulti, IsMap>();
1798 testElementErase<IsUnordered, IsMulti, IsMap>();
1799 testRangeErase<IsUnordered, IsMulti, IsMap>();
1800 testCompare<IsUnordered, IsMulti, IsMap>();
1801 testObservers<IsUnordered, IsMulti, IsMap>();
1818 "bad alias: aged_set");
1824 "bad alias: aged_multiset");
1830 "bad alias: aged_map");
1836 "bad alias: aged_multimap");
1842 "bad alias: aged_unordered_set");
1848 "bad alias: aged_unordered_multiset");
1854 "bad alias: aged_unordered_map");
1860 "bad alias: aged_unordered_multimap");
1865 testMaybeUnorderedMultiMap<false, false, false>();
1875 testMaybeUnorderedMultiMap<false, false, true>();
1885 testMaybeUnorderedMultiMap<false, true, false>();
1895 testMaybeUnorderedMultiMap<false, true, true>();
1905 testMaybeUnorderedMultiMap<true, false, false>();
1915 testMaybeUnorderedMultiMap<true, false, true>();
1925 testMaybeUnorderedMultiMap<true, true, false>();
1935 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)