56#ifndef MICRO_OS_PLUS_MICRO_TEST_PLUS_FUNCTION_COMPARATORS_H_
57#define MICRO_OS_PLUS_MICRO_TEST_PLUS_FUNCTION_COMPARATORS_H_
61#if defined(__cplusplus)
65#if __has_include("micro-os-plus/project-config.h")
66#include "micro-os-plus/project-config.h"
69#if __has_include("micro-os-plus/micro-test-plus-defines.h")
70#include "micro-os-plus/micro-test-plus-defines.h"
78#pragma GCC diagnostic push
80#pragma GCC diagnostic ignored "-Wpadded"
81#pragma GCC diagnostic ignored "-Waggregate-return"
83#pragma clang diagnostic ignored "-Wc++98-compat"
84#pragma clang diagnostic ignored "-Wpre-c++17-compat"
85#pragma clang diagnostic ignored "-Wunknown-warning-option"
130 template <
class Lhs_T,
class Rhs_T>
133 [[nodiscard]]
constexpr auto
134 eq (Lhs_T&& lhs, Rhs_T&& rhs);
136#if !defined(__DOXYGEN__)
153 template <
class Lhs_T,
class Rhs_T>
156 [[nodiscard]]
constexpr bool
157 eq (Lhs_T&& lhs, Rhs_T&& rhs);
171 template <
class Lhs_T,
class Rhs_T>
174 [[nodiscard]]
constexpr auto
175 ne (Lhs_T&& lhs, Rhs_T&& rhs);
177#if !defined(__DOXYGEN__)
194 template <
class Lhs_T,
class Rhs_T>
197 [[nodiscard]]
constexpr bool
198 ne (Lhs_T&& lhs, Rhs_T&& rhs);
212 template <
class Lhs_T,
class Rhs_T>
215 [[nodiscard]]
constexpr auto
216 gt (Lhs_T&& lhs, Rhs_T&& rhs);
218#if !defined(__DOXYGEN__)
235 template <
class Lhs_T,
class Rhs_T>
238 [[nodiscard]]
constexpr bool
239 gt (Lhs_T&& lhs, Rhs_T&& rhs);
254 template <
class Lhs_T,
class Rhs_T>
257 [[nodiscard]]
constexpr auto
258 ge (Lhs_T&& lhs, Rhs_T&& rhs);
260#if !defined(__DOXYGEN__)
277 template <
class Lhs_T,
class Rhs_T>
280 [[nodiscard]]
constexpr bool
281 ge (Lhs_T&& lhs, Rhs_T&& rhs);
296 template <
class Lhs_T,
class Rhs_T>
299 [[nodiscard]]
constexpr auto
300 lt (Lhs_T&& lhs, Rhs_T&& rhs);
302#if !defined(__DOXYGEN__)
319 template <
class Lhs_T,
class Rhs_T>
322 [[nodiscard]]
constexpr bool
323 lt (Lhs_T&& lhs, Rhs_T&& rhs);
338 template <
class Lhs_T,
class Rhs_T>
341 [[nodiscard]]
constexpr auto
342 le (Lhs_T&& lhs, Rhs_T&& rhs);
344#if !defined(__DOXYGEN__)
361 template <
class Lhs_T,
class Rhs_T>
364 [[nodiscard]]
constexpr bool
365 le (Lhs_T&& lhs, Rhs_T&& rhs);
406 template <
class Lhs_T,
class Rhs_T,
class Epsilon_T>
410 [[nodiscard]]
constexpr auto
411 approx (Lhs_T&& lhs, Rhs_T&& rhs, Epsilon_T&& epsilon);
426 template <
class Expr_T>
428 [[nodiscard]]
constexpr auto
448 template <
class First_T,
class Second_T,
class... Rest_T>
452 [[nodiscard]]
constexpr auto
453 all_of (First_T&& first, Second_T&& second, Rest_T&&... rest);
473 template <
class First_T,
class Second_T,
class... Rest_T>
477 [[nodiscard]]
constexpr auto
478 any_of (First_T&& first, Second_T&& second, Rest_T&&... rest);
484#pragma GCC diagnostic pop
Concept satisfied when the operands of a comparator can be written and compared.
Concept satisfied when T is a valid operand of the approximate comparator.
Concept satisfied when a type can be used as a test expression in expect() or require().
C++ header file with declarations for the µTest++ internals.
C++ header file with inline implementations for the µTest++ function comparators.
constexpr auto approx(T value, std::type_identity_t< T > epsilon) noexcept -> detail::value< T >
Deprecated wrapping of a floating-point value with an explicit comparison tolerance.
constexpr auto eq(Lhs_T &&lhs, Rhs_T &&rhs)
Generic equality comparator.
constexpr auto lt(Lhs_T &&lhs, Rhs_T &&rhs)
Generic less than comparator.
constexpr auto ge(Lhs_T &&lhs, Rhs_T &&rhs)
Generic greater than or equal comparator.
constexpr auto gt(Lhs_T &&lhs, Rhs_T &&rhs)
Generic greater than comparator.
constexpr auto le(Lhs_T &&lhs, Rhs_T &&rhs)
Generic less than or equal comparator.
constexpr auto ne(Lhs_T &&lhs, Rhs_T &&rhs)
Generic non-equality comparator.
constexpr auto all_of(First_T &&first, Second_T &&second, Rest_T &&... rest)
Generic logical and operation, for two or more operands.
constexpr auto any_of(First_T &&first, Second_T &&second, Rest_T &&... rest)
Generic logical (inclusive) or operation, for two or more operands.
constexpr auto negate(Expr_T &&expr)
Generic logical not operation.
@ equal
The == operator, checked by eq().
@ greater_equal
The >= operator, checked by ge().
@ less_equal
The <= operator, checked by le().
@ greater
The > operator, checked by gt().
@ not_equal
The != operator, checked by ne().
@ less
The < operator, checked by lt().
Primary namespace for the µTest++ testing framework.