17namespace sequoia::testing
20 std::string regular_message(std::string_view description);
30 template<test_mode Mode>
34 constexpr static test_mode mode{Mode};
39 template<pseudoregular T,
class Self>
42 testing::check_semantics(regular_message(self.report(description)),
46 optional_ref<const T>{},
47 optional_ref<const T>{});
55 template<pseudoregular T,
class U,
class Self>
56 requires equivalence_checkable_for_semantics<Mode, T, U>
64 testing::check_semantics(regular_message(self.report(description)),
70 optional_ref<const T>{},
71 optional_ref<const T>{});
79 template<pseudoregular T,
class U,
class V,
class Self>
80 requires equivalence_checkable_for_semantics<Mode, T, U> && checkable_against_for_semantics<Mode, T, V>
87 const V& movedFromPostConstruction,
88 const V& movedFromPostAssignment)
90 testing::check_semantics(regular_message(self.report(description)),
96 optional_ref<const V>{movedFromPostConstruction},
97 optional_ref<const V>{movedFromPostAssignment});
101 template<pseudoregular T,
class Self>
102 requires std::totally_ordered<T>
105 testing::check_semantics(regular_message(self.report(description)),
109 optional_ref<const T>{},
110 optional_ref<const T>{},
119 template<pseudoregular T,
class U,
class Self>
120 requires std::totally_ordered<T> && equivalence_checkable_for_semantics<Mode, T, U>
125 const U& xEquivalent,
126 const U& yEquivalent,
127 std::weak_ordering order)
129 testing::check_semantics(regular_message(self.report(description)),
135 optional_ref<const T>{},
136 optional_ref<const T>{},
145 template<pseudoregular T,
class U,
class V,
class Self>
146 requires std::totally_ordered<T> && equivalence_checkable_for_semantics<Mode, T, U> && checkable_against_for_semantics<Mode, T, V>
151 const U& xEquivalent,
152 const U& yEquivalent,
153 const V& movedFromPostConstruction,
154 const V& movedFromPostAssignment,
155 std::weak_ordering order)
157 testing::check_semantics(regular_message(self.report(description)),
163 optional_ref<const V>{movedFromPostConstruction},
164 optional_ref<const V>{movedFromPostAssignment},
169 template<pseudoregular T, std::invocable<T&> Mutator,
class Self>
172 testing::check_semantics(regular_message(self.report(description)),
176 optional_ref<const T>{},
177 optional_ref<const T>{},
186 template<pseudoregular T,
class U, std::invocable<T&> Mutator,
class Self>
187 requires equivalence_checkable_for_semantics<Mode, T, U>
192 const U& xEquivalent,
193 const U& yEquivalent,
196 testing::check_semantics(regular_message(self.report(description)),
202 optional_ref<const T>{},
203 optional_ref<const T>{},
212 template<pseudoregular T,
class U,
class V, std::invocable<T&> Mutator,
class Self>
213 requires equivalence_checkable_for_semantics<Mode, T, U>
218 const U& xEquivalent,
219 const U& yEquivalent,
220 const V& movedFromPostConstruction,
221 const V& movedFromPostAssignment,
224 testing::check_semantics(regular_message(self.report(description)),
230 optional_ref<const V>{movedFromPostConstruction},
231 optional_ref<const V>{movedFromPostAssignment},
236 template<pseudoregular T, std::invocable<T&> Mutator,
class Self>
237 requires std::totally_ordered<T>
238 void check_semantics(
this Self& self,
const reporter& description,
const T& x,
const T& y, std::weak_ordering order, Mutator m)
240 testing::check_semantics(regular_message(self.report(description)),
244 optional_ref<const T>{},
245 optional_ref<const T>{},
255 template<pseudoregular T,
class U, std::invocable<T&> Mutator,
class Self>
256 requires std::totally_ordered<T> && equivalence_checkable_for_semantics<Mode, T, U>
261 const U& xEquivalent,
262 const U& yEquivalent,
263 std::weak_ordering order,
266 testing::check_semantics(regular_message(self.report(description)),
272 optional_ref<const T>{},
273 optional_ref<const T>{},
283 template<pseudoregular T,
class U,
class V, std::invocable<T&> Mutator,
class Self>
284 requires equivalence_checkable_for_semantics<Mode, T, U>
289 const U& xEquivalent,
290 const U& yEquivalent,
291 const V& movedFromPostConstruction,
292 const V& movedFromPostAssignment,
293 std::weak_ordering order,
296 testing::check_semantics(regular_message(self.report(description)),
302 optional_ref<const V>{movedFromPostConstruction},
303 optional_ref<const V>{movedFromPostAssignment},
314 template<test_mode mode>
Core functionality for the testing framework.
Functions for checking regular semantics.
class template from which all concrete tests should derive.
Definition: FreeTestCore.hpp:144
Extender for testing classes exhibiting regular/std::totally_ordered semantics.
Definition: RegularTestCore.hpp:32
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, std::weak_ordering order, Mutator m)
Prerequisites: x != y, with values consistent with order.
Definition: RegularTestCore.hpp:238
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, const U &xEquivalent, const U &yEquivalent)
Definition: RegularTestCore.hpp:57
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, const U &xEquivalent, const U &yEquivalent, const V &movedFromPostConstruction, const V &movedFromPostAssignment, std::weak_ordering order, Mutator m)
Definition: RegularTestCore.hpp:285
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, const U &xEquivalent, const U &yEquivalent, const V &movedFromPostConstruction, const V &movedFromPostAssignment, std::weak_ordering order)
Definition: RegularTestCore.hpp:147
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, Mutator m)
Prerequisite: x != y.
Definition: RegularTestCore.hpp:170
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, const U &xEquivalent, const U &yEquivalent, std::weak_ordering order)
Definition: RegularTestCore.hpp:121
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y)
Prerequisite: x != y.
Definition: RegularTestCore.hpp:40
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, const U &xEquivalent, const U &yEquivalent, std::weak_ordering order, Mutator m)
Definition: RegularTestCore.hpp:257
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, const U &xEquivalent, const U &yEquivalent, const V &movedFromPostConstruction, const V &movedFromPostAssignment)
Definition: RegularTestCore.hpp:81
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, const U &xEquivalent, const U &yEquivalent, const V &movedFromPostConstruction, const V &movedFromPostAssignment, Mutator m)
Definition: RegularTestCore.hpp:214
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, std::weak_ordering order)
Prerequisite: x != y, with values consistent with order.
Definition: RegularTestCore.hpp:103
void check_semantics(this Self &self, const reporter &description, const T &x, const T &y, const U &xEquivalent, const U &yEquivalent, Mutator m)
Definition: RegularTestCore.hpp:188
Definition: Output.hpp:186