50#ifndef MICRO_OS_PLUS_MICRO_TEST_PLUS_FUNCTION_COMPARATORS_H_
51#define MICRO_OS_PLUS_MICRO_TEST_PLUS_FUNCTION_COMPARATORS_H_
55#if defined(__cplusplus)
59#if __has_include("micro-os-plus/project-config.h")
60#include "micro-os-plus/project-config.h"
63#if __has_include("micro-os-plus/micro-test-plus-defines.h")
64#include "micro-os-plus/micro-test-plus-defines.h"
70#pragma GCC diagnostic push
72#pragma GCC diagnostic ignored "-Wpadded"
73#pragma GCC diagnostic ignored "-Waggregate-return"
75#pragma clang diagnostic ignored "-Wc++98-compat"
76#pragma clang diagnostic ignored "-Wpre-c++17-compat"
77#pragma clang diagnostic ignored "-Wunknown-warning-option"
98 template <
class Lhs_T,
class Rhs_T>
99 [[nodiscard]]
constexpr auto
100 eq (
const Lhs_T& lhs,
const Rhs_T& rhs);
113 template <
class Lhs_T,
class Rhs_T>
114 [[nodiscard]]
constexpr auto
115 eq (Lhs_T* lhs, Rhs_T* rhs);
128 template <
class Lhs_T,
class Rhs_T>
129 [[nodiscard]]
constexpr auto
130 ne (
const Lhs_T& lhs,
const Rhs_T& rhs);
144 template <
class Lhs_T,
class Rhs_T>
145 [[nodiscard]]
constexpr auto
146 ne (Lhs_T* lhs, Rhs_T* rhs);
159 template <
class Lhs_T,
class Rhs_T>
160 [[nodiscard]]
constexpr auto
161 gt (
const Lhs_T& lhs,
const Rhs_T& rhs);
174 template <
class Lhs_T,
class Rhs_T>
175 [[nodiscard]]
constexpr auto
176 gt (Lhs_T* lhs, Rhs_T* rhs);
190 template <
class Lhs_T,
class Rhs_T>
191 [[nodiscard]]
constexpr auto
192 ge (
const Lhs_T& lhs,
const Rhs_T& rhs);
206 template <
class Lhs_T,
class Rhs_T>
207 [[nodiscard]]
constexpr auto
208 ge (Lhs_T* lhs, Rhs_T* rhs);
222 template <
class Lhs_T,
class Rhs_T>
223 [[nodiscard]]
constexpr auto
224 lt (
const Lhs_T& lhs,
const Rhs_T& rhs);
238 template <
class Lhs_T,
class Rhs_T>
239 [[nodiscard]]
constexpr auto
240 lt (Lhs_T* lhs, Rhs_T* rhs);
254 template <
class Lhs_T,
class Rhs_T>
255 [[nodiscard]]
constexpr auto
256 le (
const Lhs_T& lhs,
const Rhs_T& rhs);
270 template <
class Lhs_T,
class Rhs_T>
271 [[nodiscard]]
constexpr auto
272 le (Lhs_T* lhs, Rhs_T* rhs);
283 template <
class Expr_T>
284 [[nodiscard]]
constexpr auto
285 _not (
const Expr_T& expr);
299 template <
class Lhs_T,
class Rhs_T>
300 [[nodiscard]]
constexpr auto
301 _and (
const Lhs_T& lhs,
const Rhs_T& rhs);
315 template <
class Lhs_T,
class Rhs_T>
316 [[nodiscard]]
constexpr auto
317 _or (
const Lhs_T& lhs,
const Rhs_T& rhs);
329 [[nodiscard]]
constexpr auto
330 mut (
const T& t)
noexcept -> T&;
336#pragma GCC diagnostic pop
C++ header file with inline implementations for the µTest++ function comparators.
constexpr auto le(const Lhs_T &lhs, const Rhs_T &rhs)
Generic less than or equal comparator.
constexpr auto ge(const Lhs_T &lhs, const Rhs_T &rhs)
Generic greater than or equal comparator.
constexpr auto ne(const Lhs_T &lhs, const Rhs_T &rhs)
Generic non-equality comparator.
constexpr auto lt(const Lhs_T &lhs, const Rhs_T &rhs)
Generic less than comparator.
constexpr auto gt(const Lhs_T &lhs, const Rhs_T &rhs)
Generic greater than comparator.
constexpr auto eq(const Lhs_T &lhs, const Rhs_T &rhs)
Generic equality comparator for non-pointer types.
constexpr auto _and(const Lhs_T &lhs, const Rhs_T &rhs)
Generic logical and operation.
constexpr auto _or(const Lhs_T &lhs, const Rhs_T &rhs)
Generic logical or operation.
constexpr auto _not(const Expr_T &expr)
Generic logical not operation.
constexpr auto mut(const T &t) noexcept -> T &
Generic mutator to remove const qualification from any type.
Primary namespace for the µTest++ testing framework.