37#ifndef MICRO_OS_PLUS_MICRO_TEST_PLUS_CHECK_RESULT_H_
38#define MICRO_OS_PLUS_MICRO_TEST_PLUS_CHECK_RESULT_H_
42#if defined(__cplusplus)
46#if __has_include("micro-os-plus/project-config.h")
47#include "micro-os-plus/project-config.h"
50#if __has_include("micro-os-plus/micro-test-plus-defines.h")
51#include "micro-os-plus/micro-test-plus-defines.h"
64#pragma GCC diagnostic push
66#pragma GCC diagnostic ignored "-Wpadded"
67#pragma GCC diagnostic ignored "-Waggregate-return"
69#pragma clang diagnostic ignored "-Wc++98-compat"
243 template <
class Expr_T>
320 operator<< (const T& msg) &&;
322#if !defined(__DOXYGEN__)
356 value (
void)
const&&
noexcept;
424#if defined(__cpp_exceptions)
446#pragma GCC diagnostic pop
C++ header file with inline implementations for the µTest++ check result.
bool value(void) const &&noexcept
Retrieves the result value.
check_result & operator=(const check_result &)=delete
Deleted copy assignment operator to prevent copying.
int uncaught_exceptions_
The number of uncaught exceptions when the check was created.
test_case * test_case_
Pointer to the test case invoking this check.
void start(bool value, check_kind kind, bool has_expression, const reflection::source_location &location, test_case &test_case, bool writes_passed)
Starts the result of a check from its parts.
check_result(void)
Constructs a result in the initial state.
bool is_written_
Whether the outcome of the check is written.
check_result && operator<<(const T &msg) &&
Appends a message to the check.
void init(const Expr_T &expr, check_kind kind, const reflection::source_location &location, test_case &test_case, expression_formatter &expression, bool writes_passed)
Initialises the result with the check of an expression.
check_result(check_result &&)=delete
Deleted move constructor to prevent moving.
check_result(const check_result &)=delete
Deleted copy constructor to prevent copying.
bool value_
Stores the result value of the check.
failure_info info_
The details displayed when the check fails.
Local implementation of source location information for diagnostics.
A named, runnable test case that lives inside a suite.
Concept satisfied when T can be appended to the message of a check.
C++ header file with declarations for the µTest++ extension concepts.
Internal implementation details for the µTest++ framework.
check_kind
The kind of a check, which determines what happens when it fails.
@ requirement
A check created by require().
@ expectation
A check created by expect().
Primary namespace for the µTest++ testing framework.
C++ header file with declarations for the µTest++ reflection utilities.
The details of a check, displayed when it fails.
bool has_expression
Indicates whether the check has an associated expression.
reflection::source_location location
The source location of the check.
std::string message
The message passed via operator<<(), if any.
check_kind kind
The kind of the check.
constexpr value(const T &_value) noexcept
Constructs a value object with the specified value.