18namespace sequoia::testing
20 template<
class T=
int,
class Allocator=std::allocator<
int>>
23 using allocator_type = Allocator;
45 std::ranges::swap(x, other.x);
49 noexcept(
noexcept(lhs.swap(rhs)))
54 std::vector<T, Allocator> x{};
68 return lhs.x <= rhs.x;
80 return lhs.x >= rhs.x;
86 if(lhs < rhs)
return std::weak_ordering::less;
88 if(rhs > lhs)
return std::weak_ordering::greater;
90 return std::weak_ordering::equivalent;
93 template<
class Stream>
96 for(
auto i : b.x) s << i <<
' ';
101 template<
class T,
class Allocator>
104 template<
class Logger>
107 check(weak_equivalence,
"", logger, std::begin(beast.x), std::end(beast.x), std::begin(prediction), std::end(prediction));
111 template<
class T =
int,
class Allocator = std::allocator<
int>>
114 using value_type = T;
115 using allocator_type = Allocator;
128 : x{std::move(other.x)}
139 x = std::move(other.x);
147 std::ranges::swap(x, other.x);
151 noexcept(
noexcept(lhs.swap(rhs)))
156 std::vector<T, Allocator> x{};
161 template<
class Stream>
164 for(
const auto& i : b.x) s << i <<
'\n';
169 template<
class T,
class Allocator>
172 template<
class T=
int,
class Allocator=std::allocator<
int>>
175 using allocator_type = Allocator;
179 regular_broken_less(std::initializer_list<T> list,
const allocator_type& a) : x{list, a} {}
193 void swap(
regular_broken_less& other)
noexcept(
noexcept(std::ranges::swap(this->x, other.x)))
195 std::ranges::swap(x, other.x);
199 noexcept(
noexcept(lhs.swap(rhs)))
204 std::vector<T, Allocator> x{};
212 return lhs.x > rhs.x;
218 return lhs.x <= rhs.x;
224 return lhs.x > rhs.x;
230 return lhs.x >= rhs.x;
236 if(lhs < rhs)
return std::weak_ordering::less;
238 if(rhs > lhs)
return std::weak_ordering::greater;
240 return std::weak_ordering::equivalent;
243 template<
class Stream>
246 for(
auto i : b.x) s << i <<
' ';
251 template<
class T=
int,
class Allocator=std::allocator<
int>>
254 using allocator_type = Allocator;
274 std::ranges::swap(x, other.x);
278 noexcept(
noexcept(lhs.swap(rhs)))
283 std::vector<T, Allocator> x{};
291 return lhs.x < rhs.x;
297 return lhs.x >= rhs.x;
303 return lhs.x > rhs.x;
309 return lhs.x >= rhs.x;
315 if(lhs < rhs)
return std::weak_ordering::less;
317 if(rhs > lhs)
return std::weak_ordering::greater;
319 return std::weak_ordering::equivalent;
322 template<
class Stream>
325 for(
auto i : b.x) s << i <<
' ';
330 template<
class T=
int,
class Allocator=std::allocator<
int>>
333 using allocator_type = Allocator;
353 std::ranges::swap(x, other.x);
357 noexcept(
noexcept(lhs.swap(rhs)))
362 std::vector<T, Allocator> x{};
373 return lhs.x < rhs.x;
379 return lhs.x <= rhs.x;
385 return lhs.x < rhs.x;
391 return lhs.x >= rhs.x;
397 if(lhs < rhs)
return std::weak_ordering::less;
399 if(rhs > lhs)
return std::weak_ordering::greater;
401 return std::weak_ordering::equivalent;
404 template<
class Stream>
407 for(
auto i : b.x) s << i <<
' ';
412 template<
class T=
int,
class Allocator=std::allocator<
int>>
415 using allocator_type = Allocator;
435 std::ranges::swap(x, other.x);
439 noexcept(
noexcept(lhs.swap(rhs)))
444 std::vector<T, Allocator> x{};
455 return lhs.x < rhs.x;
461 return lhs.x >= rhs.x;
467 return lhs.x > rhs.x;
473 return lhs.x >= rhs.x;
479 if(lhs < rhs)
return std::weak_ordering::less;
481 if(rhs > lhs)
return std::weak_ordering::greater;
483 return std::weak_ordering::equivalent;
486 template<
class Stream>
489 for(
auto i : b.x) s << i <<
' ';
494 template<
class T=
int,
class Allocator=std::allocator<
int>>
497 using allocator_type = Allocator;
517 std::ranges::swap(x, other.x);
521 noexcept(
noexcept(lhs.swap(rhs)))
526 std::vector<T, Allocator> x{};
537 return lhs.x > rhs.x;
543 return lhs.x >= rhs.x;
549 return lhs.x < rhs.x;
555 return lhs.x <= rhs.x;
561 if(lhs < rhs)
return std::weak_ordering::less;
563 if(rhs > lhs)
return std::weak_ordering::greater;
565 return std::weak_ordering::equivalent;
568 template<
class Stream>
571 for(
auto i : b.x) s << i <<
' ';
576 template<
class T=
int,
class Allocator=std::allocator<
int>>
579 using allocator_type = Allocator;
599 std::ranges::swap(x, other.x);
603 noexcept(
noexcept(lhs.swap(rhs)))
608 std::vector<T, Allocator> x{};
619 return lhs.x < rhs.x;
625 return lhs.x <= rhs.x;
631 return lhs.x > rhs.x;
637 return lhs.x >= rhs.x;
643 if(lhs < rhs)
return std::weak_ordering::greater;
645 if(rhs > lhs)
return std::weak_ordering::less;
647 return std::weak_ordering::equivalent;
650 template<
class Stream>
653 for(
auto i : b.x) s << i <<
' ';
658 template<
class T=
int,
class Allocator=std::allocator<
int>>
661 using allocator_type = Allocator;
683 std::ranges::swap(x, other.x);
687 noexcept(
noexcept(lhs.swap(rhs)))
692 std::vector<T, Allocator> x{};
703 return lhs.x < rhs.x;
709 return lhs.x <= rhs.x;
715 return lhs.x > rhs.x;
721 return lhs.x >= rhs.x;
727 if(lhs < rhs)
return std::weak_ordering::less;
729 if(rhs > lhs)
return std::weak_ordering::greater;
731 return std::weak_ordering::equivalent;
734 template<
class Stream>
737 for(
auto i : b.x) s << i <<
' ';
743 template<
class T,
class Allocator>
750 return shift_comparison(count);
755 return shift_comparison(count);
760 return shift_comparison(count);
765 return shift_comparison(count);
770 return shift_comparison(count, 6);
773 static int shift_comparison(
int count, [[maybe_unused]]
int shift = 2)
noexcept
775 if constexpr (with_msvc_v && (iterator_debug_level() > 0))
777 return count + shift;
Client-facing utilities for performing allocation checks.
bool check(CheckType flavour, std::string description, test_logger< Mode > &logger, Iter first, Sentinel last, PredictionIter predictionFirst, PredictionSentinel predictionLast, tutor< Advisor > advisor={})
The workhorse for comparing the contents of ranges.
Definition: FreeCheckers.hpp:377
Definition: AllocationCheckersCore.hpp:73
Definition: AllocationCheckers.hpp:200
Definition: SemanticsTestDiagnosticsUtilities.hpp:20
Definition: FreeCheckers.hpp:107
Definition: OrderableRegularTestDiagnosticsUtilities.hpp:22
Definition: OrderableRegularTestDiagnosticsUtilities.hpp:660
Definition: OrderableRegularTestDiagnosticsUtilities.hpp:113
Definition: OrderableRegularTestDiagnosticsUtilities.hpp:332
Definition: OrderableRegularTestDiagnosticsUtilities.hpp:414
Definition: OrderableRegularTestDiagnosticsUtilities.hpp:174
Definition: OrderableRegularTestDiagnosticsUtilities.hpp:253
Definition: OrderableRegularTestDiagnosticsUtilities.hpp:578
Definition: OrderableRegularTestDiagnosticsUtilities.hpp:496
class template, specializations of which implement various comparisons for the specified type.
Definition: FreeCheckers.hpp:78