micro-test-plus 6.0.0
µTest++ Testing Framework
Loading...
Searching...
No Matches
micro_os_plus::micro_test_plus::detail::failure_info Struct Reference

The details of a check, displayed when it fails. More...

#include <check-result.h>

Public Attributes

bool has_expression
 Indicates whether the check has an associated expression.
check_kind kind
 The kind of the check.
reflection::source_location location
 The source location of the check.
std::string message
 The message passed via operator<<(), if any.

Detailed Description

Grouped in one object, passed to reporter::fail(), so that the call sites do not pass unlabelled Boolean arguments. Held by check_result, and built by test_case when reporting an unexpected exception.

The message is also displayed when the check passes.

Definition at line 126 of file check-result.h.

Member Data Documentation

◆ has_expression

bool micro_os_plus::micro_test_plus::detail::failure_info::has_expression

Set when the checked expression is a framework comparator, whose formatted text is displayed on failure.

Definition at line 152 of file check-result.h.

Referenced by micro_os_plus::micro_test_plus::detail::reporter::fail().

◆ kind

check_kind micro_os_plus::micro_test_plus::detail::failure_info::kind

Determines whether the failure stops the test case, and whether the reporter displays the abort notice.

Definition at line 135 of file check-result.h.

Referenced by micro_os_plus::micro_test_plus::detail::check_result::~check_result(), and micro_os_plus::micro_test_plus::detail::reporter::fail().

◆ location

reflection::source_location micro_os_plus::micro_test_plus::detail::failure_info::location

Displayed with failures, and used when aborting.

Definition at line 160 of file check-result.h.

Referenced by micro_os_plus::micro_test_plus::detail::check_result::~check_result(), and micro_os_plus::micro_test_plus::detail::reporter::fail().

◆ message

std::string micro_os_plus::micro_test_plus::detail::failure_info::message

The documentation for this struct was generated from the following file: