38#if __has_include("micro-os-plus/diag/trace.h")
39#include "micro-os-plus/diag/trace.h"
47#pragma GCC diagnostic ignored "-Waggregate-return"
49#pragma clang diagnostic ignored "-Wc++98-compat"
50#pragma clang diagnostic ignored "-Wexit-time-destructors"
51#pragma clang diagnostic ignored "-Wglobal-constructors"
57#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_ENABLED)
97#if defined(__cpp_exceptions)
141#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
142 trace::printf (
"%s\n", __PRETTY_FUNCTION__);
159 const std::string& expression_str = expression.
check_text (
this);
181 expression.end_check (
this);
185#if defined(__cpp_exceptions)
C++ header file with declarations for the µTest++ check result.
void increment_passed_checks(size_t count=1) noexcept
Increments the passed-checks counter.
void increment_failed_checks(size_t count=1) noexcept
Increments the failed-checks counter.
bool value(void) const &&noexcept
Retrieves the result value.
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() noexcept(false)
Destructor that reports the check.
bool value_
Stores the result value of the check.
failure_info info_
The details displayed when the check fails.
void fail(const failure_info &failure, const std::string &expression, const test_case &test_case)
Reports a failed condition.
virtual void pass_without_text(const test_case &test_case)=0
Reports a passed condition whose text is not written.
expression_formatter expression_
Expression formatter for pass and fail reporting.
void pass(const std::string &message, const std::string &expression, const test_case &test_case)
Reports a passed condition.
size_t next_test_point_number(void) noexcept
Advances to the next child test point, and returns its number.
void abort(const reflection::source_location &sl=reflection::source_location::current()) const
Aborts test execution via the owning runner, for a failed requirement.
class reporter & test_reporter(void) const noexcept
Returns the test reporter associated with this test runnable.
counters totals_
Totals for the node.
Local implementation of source location information for diagnostics.
A named, runnable test case that lives inside a suite.
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().
Primary namespace for the µTest++ testing framework.
The exception thrown to stop a test case after a failed require().
The details of a check, displayed when it fails.
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.
C++ header file with declarations for the µTest++ test hierarchy.