The function-comparators.h
File Reference
C++ header file with declarations for the µTest++ function comparators. More...
Namespaces Index
namespace | micro_os_plus |
The primary namespace for the µOS++ framework. More... | |
namespace | micro_os_plus::micro_test_plus |
Primary namespace for the µTest++ testing framework. More... | |
Functions Index
template <class Lhs_T, class Rhs_T> | |
constexpr auto | _and (const Lhs_T &lhs, const Rhs_T &rhs) |
Generic logical and operation. More... | |
template <class Expr_T> | |
constexpr auto | _not (const Expr_T &expr) |
Generic logical not operation. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | _or (const Lhs_T &lhs, const Rhs_T &rhs) |
Generic logical or operation. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | eq (const Lhs_T &lhs, const Rhs_T &rhs) |
Generic equality comparator for non-pointer types. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | eq (Lhs_T *lhs, Rhs_T *rhs) |
Pointer equality comparator for any pointer types. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | ge (const Lhs_T &lhs, const Rhs_T &rhs) |
Generic greater than or equal comparator. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | ge (Lhs_T *lhs, Rhs_T *rhs) |
Pointer greater than or equal comparator. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | gt (const Lhs_T &lhs, const Rhs_T &rhs) |
Generic greater than comparator. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | gt (Lhs_T *lhs, Rhs_T *rhs) |
Pointer greater than comparator. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | le (const Lhs_T &lhs, const Rhs_T &rhs) |
Generic less than or equal comparator. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | le (Lhs_T *lhs, Rhs_T *rhs) |
Pointer less than or equal comparator. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | lt (const Lhs_T &lhs, const Rhs_T &rhs) |
Generic less than comparator. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | lt (Lhs_T *lhs, Rhs_T *rhs) |
Pointer less than comparator. More... | |
template <class T> | |
constexpr T & | mut (const T &t) noexcept |
Generic mutator to remove const qualification from any type. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | ne (const Lhs_T &lhs, const Rhs_T &rhs) |
Generic non-equality comparator. More... | |
template <class Lhs_T, class Rhs_T> | |
constexpr auto | ne (Lhs_T *lhs, Rhs_T *rhs) |
Pointer non-equality comparator. More... | |
Description
C++ header file with declarations for the µTest++ function comparators.
This header provides the declarations for the function comparator templates and logical operators used within the µTest++ framework. It defines the interfaces for generic and pointer-based comparison functions, including equality, non-equality, greater than, less than, and their respective logical variants. Additionally, it declares logical combinators such as conjunction (_and
), disjunction (_or
), and negation (_not
), as well as a utility for safely removing constness from objects.
These comparators and logical operators enable expressive and type-safe test expectations and assertions, supporting both value and pointer semantics. The underscore-prefixed logical operators are intentionally named to avoid conflicts with standard operators and provide clear, readable test expressions.
All definitions reside within the micro_os_plus::micro_test_plus
namespace, ensuring clear separation from user code and minimising the risk of naming conflicts.
The header files are organised within the include/micro-os-plus/micro-test-plus
folder to maintain a structured and modular codebase.
This file is intended solely for internal use within the framework and should not be included directly by user code.
File Listing
The file content with the documentation metadata removed is:
Generated via docusaurus-plugin-doxygen by Doxygen 1.14.0.