19namespace sequoia::testing
26 template<test_mode Mode>
30 constexpr static test_mode mode{Mode};
34 template<
class Self, pseudoregular T, std::invocable<T&> Mutator, alloc_getter<T>... Getters>
35 requires (!std::totally_ordered<T> && (
sizeof...(Getters) > 0))
38 testing::check_semantics(append_lines(self.report(description), emphasise(
"Regular Semantics")), self.m_Logger, x, y, m, info...);
47 std::invocable<T&> Mutator,
50 requires (!std::totally_ordered<T> && (
sizeof...(Getters) > 0))
53 return testing::check_semantics(append_lines(self.report(description), emphasise(
"Regular Semantics")), self.m_Logger, std::move(xFn), std::move(yFn), m, info...);
56 template<
class Self, pseudoregular T, std::invocable<T&> Mutator, alloc_getter<T>... Getters>
57 requires (std::totally_ordered<T> && (
sizeof...(Getters) > 0))
60 testing::check_semantics(append_lines(self.report(description), emphasise(
"Ordered Semantics")), self.m_Logger, x, y, order, m, info...);
69 std::invocable<T&> Mutator,
72 requires (std::totally_ordered<T> && (
sizeof...(Getters) > 0))
73 std::pair<T, T> check_semantics(
this Self& self,
const reporter& description, xMaker xFn, yMaker yFn, std::weak_ordering order, Mutator m,
allocation_info<T, Getters>... info)
75 return testing::check_semantics(append_lines(self.report(description), emphasise(
"Ordered Semantics")), self.m_Logger, std::move(xFn), std::move(yFn), order, m, info...);
102 template<test_mode Mode>
115 void do_allocation_tests(
this Self& self)
117 self.template test_allocation<false, false, false>();
118 self.template test_allocation<false, false, true>();
119 self.template test_allocation<false, true, false>();
120 self.template test_allocation<false, true, true>();
121 self.template test_allocation<true, false, false>();
122 self.template test_allocation<true, false, true>();
123 self.template test_allocation<true, true, false>();
124 self.template test_allocation<true, true, true>();
Utilities for allocation testing.
Utilities for performing allocation checks for regular types, see here.
Utilities for checking regular semantics.
Class for use with a container possessing a (shared counting) allocator.
Definition: AllocationCheckers.hpp:425
Templated on the test_mode, this forms the basis of all allocation tests for regular types.
Definition: RegularAllocationTestCore.hpp:104
class template from which all concrete tests should derive.
Definition: FreeTestCore.hpp:144
class template for plugging into the checker class template to provide allocation checks for regular ...
Definition: RegularAllocationTestCore.hpp:28
Definition: Output.hpp:186
Supplements std::invocable.
Definition: Concepts.hpp:24
Similar to std::regular but relaxes the requirement of default initializability.
Definition: Concepts.hpp:39
Definition: AllocationCheckersTraits.hpp:24