48#ifndef MICRO_TEST_PLUS_TEST_REPORTER_H_
49#define MICRO_TEST_PLUS_TEST_REPORTER_H_
68#pragma GCC diagnostic push
69#pragma GCC diagnostic ignored "-Wpadded"
70#pragma GCC diagnostic ignored "-Waggregate-return"
72#pragma clang diagnostic ignored "-Wc++98-compat"
73#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
212 [[nodiscard]]
inline auto
394 template <
typename T>
459 template <
class Lhs_T,
class Rhs_T>
472 template <
class Lhs_T,
class Rhs_T>
485 template <
class Lhs_T,
class Rhs_T>
498 template <
class Lhs_T,
class Rhs_T>
511 template <
class Lhs_T,
class Rhs_T>
524 template <
class Lhs_T,
class Rhs_T>
537 template <
class Lhs_T,
class Rhs_T>
550 template <
class Lhs_T,
class Rhs_T>
566#if defined(__cpp_exceptions)
577 template <
class Expr_T,
class Exception_T>
589 template <
class Expr_T>
601 template <
class Expr_T>
629 template <
class Expr_T>
631 pass (Expr_T& expr, std::string& message);
645 template <
class Expr_T>
647 fail (Expr_T& expr,
bool abort, std::string& message,
790#pragma GCC diagnostic pop
Local implementation of source location information for diagnostics.
Reporter to display test results, including operand values and types for failures.
colors colors_
ANSI colour codes for output formatting.
void endline(void)
Inserts a line ending into the output buffer.
bool is_in_test_case_
Indicates whether the reporter is currently within a test case.
std::string out_
Internal output buffer for accumulating report content.
test_reporter()=default
Default constructor for the test_reporter class.
void output_pass_suffix_(void)
Outputs the suffix for a passing condition.
void output(void)
Output the current buffered content.
void pass(Expr_T &expr, std::string &message)
Report a passed condition.
void output_fail_suffix_(bool abort)
Outputs the suffix for a failing condition.
void flush(void)
Flush the current buffered content.
void fail(Expr_T &expr, bool abort, std::string &message, const reflection::source_location &location)
Report a failed condition.
void end_test_case(const char *name)
Mark the end of a test case.
void begin_test_case(const char *name)
Mark the beginning of a test case.
test_reporter & operator<<(std::string_view sv)
Output operator for std::string_view.
void end_test_suite(test_suite_base &suite)
Mark the end of a test suite.
void begin_test_suite(const char *name)
Mark the beginning of a test suite.
verbosity_t verbosity
The verbosity level for test reporting.
void output_fail_prefix_(std::string &message, const reflection::source_location &location)
Outputs the prefix for a failing condition.
auto color(const bool cond)
Selects the appropriate colour code based on a condition.
bool add_empty_line
Controls whether to add an empty line between successful test cases.
void output_pass_prefix_(std::string &message)
Outputs the prefix for a passing condition.
Base class for all test suites.
C++ header file with declarations for the µTest++ internals.
static constexpr auto has_npos_v
Variable template to determine if a type provides a static npos member.
typename requires_< Cond >::type requires_t
Alias template for extracting the type member from requires_.
Primary namespace for the µTest++ testing framework.
verbosity verbosity_t
Type alias for the verbosity enumeration used in test reporting.
verbosity
The verbosity levels for test reporting.
test_reporter & endl(test_reporter &stream)
Output stream manipulator for ending a line in test reports.
Colours used to highlight pass and fail results in test reports.
const char * pass
Green colour.
const char * fail
Red colour.
const char * none
Default colour.
Logical AND comparator struct template.
Equality comparator struct template.
Greater than or equal comparator struct template.
Greater than comparator struct template.
Less than or equal comparator struct template.
Less than comparator struct template.
Non-equality comparator struct template.
Logical NOT comparator struct template.
Operator struct template to check if an expression does not throw any exception.
Logical OR comparator struct template.
Operator struct template to check if an expression throws a specific exception.
Struct template representing a genuine integral value.
C++ header file with declarations for the µTest++ test suite.
C++ header file with declarations for the µTest++ type trait utilities and metaprogramming support.