50#ifndef MICRO_TEST_PLUS_FUNCTION_COMPARATORS_H_
51#define MICRO_TEST_PLUS_FUNCTION_COMPARATORS_H_
60#pragma GCC diagnostic push
61#pragma GCC diagnostic ignored "-Wpadded"
62#pragma GCC diagnostic ignored "-Waggregate-return"
64#pragma clang diagnostic ignored "-Wc++98-compat"
65#pragma clang diagnostic ignored "-Wpre-c++17-compat"
66#pragma clang diagnostic ignored "-Wunknown-warning-option"
87 template <
class Lhs_T,
class Rhs_T>
88 [[nodiscard]]
constexpr auto
89 eq (
const Lhs_T& lhs,
const Rhs_T& rhs);
102 template <
class Lhs_T,
class Rhs_T>
103 [[nodiscard]]
constexpr auto
104 eq (Lhs_T* lhs, Rhs_T* rhs);
117 template <
class Lhs_T,
class Rhs_T>
118 [[nodiscard]]
constexpr auto
119 ne (
const Lhs_T& lhs,
const Rhs_T& rhs);
133 template <
class Lhs_T,
class Rhs_T>
134 [[nodiscard]]
constexpr auto
135 ne (Lhs_T* lhs, Rhs_T* rhs);
148 template <
class Lhs_T,
class Rhs_T>
149 [[nodiscard]]
constexpr auto
150 gt (
const Lhs_T& lhs,
const Rhs_T& rhs);
163 template <
class Lhs_T,
class Rhs_T>
164 [[nodiscard]]
constexpr auto
165 gt (Lhs_T* lhs, Rhs_T* rhs);
179 template <
class Lhs_T,
class Rhs_T>
180 [[nodiscard]]
constexpr auto
181 ge (
const Lhs_T& lhs,
const Rhs_T& rhs);
195 template <
class Lhs_T,
class Rhs_T>
196 [[nodiscard]]
constexpr auto
197 ge (Lhs_T* lhs, Rhs_T* rhs);
211 template <
class Lhs_T,
class Rhs_T>
212 [[nodiscard]]
constexpr auto
213 lt (
const Lhs_T& lhs,
const Rhs_T& rhs);
227 template <
class Lhs_T,
class Rhs_T>
228 [[nodiscard]]
constexpr auto
229 lt (Lhs_T* lhs, Rhs_T* rhs);
243 template <
class Lhs_T,
class Rhs_T>
244 [[nodiscard]]
constexpr auto
245 le (
const Lhs_T& lhs,
const Rhs_T& rhs);
259 template <
class Lhs_T,
class Rhs_T>
260 [[nodiscard]]
constexpr auto
261 le (Lhs_T* lhs, Rhs_T* rhs);
272 template <
class Expr_T>
273 [[nodiscard]]
constexpr auto
274 _not (
const Expr_T& expr);
288 template <
class Lhs_T,
class Rhs_T>
289 [[nodiscard]]
constexpr auto
290 _and (
const Lhs_T& lhs,
const Rhs_T& rhs);
304 template <
class Lhs_T,
class Rhs_T>
305 [[nodiscard]]
constexpr auto
306 _or (
const Lhs_T& lhs,
const Rhs_T& rhs);
318 [[nodiscard]]
constexpr auto
319 mut (
const T& t)
noexcept -> T&;
325#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.