42#ifndef MICRO_OS_PLUS_MICRO_TEST_PLUS_DETAIL_H_
43#define MICRO_OS_PLUS_MICRO_TEST_PLUS_DETAIL_H_
47#if defined(__cplusplus)
51#if __has_include("micro-os-plus/project-config.h")
52#include "micro-os-plus/project-config.h"
55#if __has_include("micro-os-plus/micro-test-plus-defines.h")
56#include "micro-os-plus/micro-test-plus-defines.h"
68#pragma GCC diagnostic push
70#pragma GCC diagnostic ignored "-Wpadded"
71#pragma GCC diagnostic ignored "-Waggregate-return"
73#pragma clang diagnostic ignored "-Wc++98-compat"
125 template <
class Expr_T>
150 [[nodiscard]]
constexpr auto
179 constexpr unary_op_ (
const T& t,
bool value);
188 [[nodiscard]]
constexpr
189 operator bool ()
const;
198 [[nodiscard]]
constexpr auto
231 template <
class Lhs_T,
class Rhs_T>
251 [[nodiscard]]
constexpr
252 operator bool ()
const;
261 [[nodiscard]]
constexpr auto
271 [[nodiscard]]
constexpr auto
313 template <
class Lhs_T,
class Rhs_T>
322 constexpr eq_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
326 template <
typename Lhs_T,
typename Rhs_T>
345 template <
class Lhs_T,
class Rhs_T>
354 constexpr ne_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
358 template <
typename Lhs_T,
typename Rhs_T>
377 template <
class Lhs_T,
class Rhs_T>
386 constexpr gt_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
390 template <
typename Lhs_T,
typename Rhs_T>
410 template <
class Lhs_T,
class Rhs_T>
420 constexpr ge_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
424 template <
typename Lhs_T,
typename Rhs_T>
443 template <
class Lhs_T,
class Rhs_T>
452 constexpr lt_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
456 template <
typename Lhs_T,
typename Rhs_T>
476 template <
class Lhs_T,
class Rhs_T>
486 constexpr le_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
490 template <
typename Lhs_T,
typename Rhs_T>
510 template <
class Lhs_T,
class Rhs_T>
519 constexpr and_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
523 template <
typename Lhs_T,
typename Rhs_T>
543 template <
class Lhs_T,
class Rhs_T>
552 constexpr or_ (
const Lhs_T&
lhs = {},
const Rhs_T&
rhs = {});
556 template <
typename Lhs_T,
typename Rhs_T>
582 explicit constexpr not_ (
const T& t = {});
586 template <
typename T>
591#if defined(__cpp_exceptions)
623 [[nodiscard]]
constexpr
624 operator bool ()
const;
652 template <
class Callable_T,
class Exception_T =
void>
661 constexpr explicit throws_ (
const Callable_T& func);
681 template <
class Callable_T>
690 constexpr explicit throws_ (
const Callable_T& func);
709 template <
class Callable_T>
718 constexpr explicit nothrow_ (
const Callable_T& func);
737 requires std::is_arithmetic_v<T>
748#pragma GCC diagnostic pop
Local implementation of source location information for diagnostics.
C++ header file with inline implementations for the µTest++ internal detail namespace.
Internal implementation details for the µTest++ framework.
le_(const Lhs_T &, const Rhs_T &) -> le_< Lhs_T, Rhs_T >
or_(const Lhs_T &, const Rhs_T &) -> or_< Lhs_T, Rhs_T >
eq_(const Lhs_T &, const Rhs_T &) -> eq_< Lhs_T, Rhs_T >
ne_(const Lhs_T &, const Rhs_T &) -> ne_< Lhs_T, Rhs_T >
gt_(const Lhs_T &, const Rhs_T &) -> gt_< Lhs_T, Rhs_T >
and_(const Lhs_T &, const Rhs_T &) -> and_< Lhs_T, Rhs_T >
void append_number_(std::string &buffer, T v)
Appends the string representation of a numeric value to a buffer, using std::to_chars for allocation-...
constexpr auto get(const T &t)
Generic getter function template for value retrieval.
lt_(const Lhs_T &, const Rhs_T &) -> lt_< Lhs_T, Rhs_T >
ge_(const Lhs_T &, const Rhs_T &) -> ge_< Lhs_T, Rhs_T >
not_(const T &) -> not_< T >
Primary namespace for the µTest++ testing framework.
C++ header file with declarations for the µTest++ reflection utilities.
Logical AND comparator struct template.
constexpr and_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a logical AND comparator for the given operands.
Assertion struct template for parameter passing to the evaluator.
Expr_T expr
The expression under evaluation.
reflection::source_location location
The source location associated with the assertion.
const bool value_
Stores the result of the comparison.
constexpr auto lhs(void) const
Retrieves the left-hand operand.
constexpr binary_op_(const Lhs_T &lhs, const Rhs_T &rhs, bool value)
Constructs a binary comparator with the given operands and pre-computed result.
const Rhs_T rhs_
Stores the right-hand operand.
const Lhs_T lhs_
Stores the left-hand operand.
constexpr auto rhs(void) const
Retrieves the right-hand operand.
constexpr callable_op_(bool value)
Constructs a callable operator with the pre-computed boolean result.
const bool value_
Stores the result of the callable invocation.
Equality comparator struct template.
constexpr eq_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs an equality comparator for the given operands.
Greater than or equal comparator struct template.
constexpr ge_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a greater than or equal comparator for the given operands.
Greater than comparator struct template.
constexpr gt_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a greater than comparator for the given operands.
Less than or equal comparator struct template.
constexpr le_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a less than or equal comparator for the given operands.
Less than comparator struct template.
constexpr lt_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a less than comparator for the given operands.
Non-equality comparator struct template.
constexpr ne_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a non-equality comparator for the given operands.
Logical NOT comparator struct template.
constexpr not_(const T &t={})
Constructs a logical NOT comparator for the given operand.
constexpr nothrow_(const Callable_T &func)
Constructs a nothrow checking operator for the given callable.
Logical OR comparator struct template.
constexpr or_(const Lhs_T &lhs={}, const Rhs_T &rhs={})
Constructs a logical OR comparator for the given operands.
constexpr throws_(const Callable_T &func)
Constructs an exception checking operator for the given callable.
constexpr throws_(const Callable_T &func)
Constructs an exception checking operator for the given callable.
const T t_
Stores the operand.
constexpr auto operand() const
Retrieves the wrapped operand expression.
constexpr unary_op_(const T &t, bool value)
Constructs a unary comparator with the given operand and pre-computed result.
const bool value_
Stores the result of the operation.
Empty base struct for all operator types.
C++ header file with declarations for the µTest++ type trait utilities and metaprogramming support.