17#ifndef MICRO_TEST_PLUS_TEST_REPORTER_H_
18#define MICRO_TEST_PLUS_TEST_REPORTER_H_
37#pragma GCC diagnostic push
38#pragma GCC diagnostic ignored "-Wpadded"
39#pragma GCC diagnostic ignored "-Waggregate-return"
41#pragma clang diagnostic ignored "-Wc++98-compat"
42#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
56 const char*
none =
"\033[0m";
57 const char*
pass =
"\033[32m";
58 const char*
fail =
"\033[31m";
92 [[nodiscard]]
inline auto
157 template <
typename T>
198 template <
class Lhs_T,
class Rhs_T>
205 template <
class Lhs_T,
class Rhs_T>
212 template <
class Lhs_T,
class Rhs_T>
219 template <
class Lhs_T,
class Rhs_T>
226 template <
class Lhs_T,
class Rhs_T>
233 template <
class Lhs_T,
class Rhs_T>
240 template <
class Lhs_T,
class Rhs_T>
247 template <
class Lhs_T,
class Rhs_T>
258#if defined(__cpp_exceptions)
259 template <
class Expr_T,
class Exception_T>
263 template <
class Expr_T>
267 template <
class Expr_T>
280 template <
class Expr_T>
282 pass (Expr_T& expr, std::string& message);
287 template <
class Expr_T>
289 fail (Expr_T& expr,
bool abort, std::string& message,
346#pragma GCC diagnostic pop
Local implementation of the std::source_location.
Reporter to display the test results. For failed tests it prints the actual values of the operands,...
void output_pass_suffix_(void)
void pass(Expr_T &expr, std::string &message)
Report a passed condition.
void output_fail_suffix_(bool abort)
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)
void begin_test_case(const char *name)
test_reporter & operator<<(std::string_view sv)
void end_test_suite(test_suite_base &suite)
void begin_test_suite(const char *name)
void output_fail_prefix_(std::string &message, const reflection::source_location &location)
auto color(const bool cond)
void output_pass_prefix_(std::string &message)
Base class for all test suites.
typename requires_< Cond >::type requires_t
static constexpr auto has_value_v
verbosity
The verbosity levels.
test_reporter & endl(test_reporter &stream)
Colours used to highlight pass vs. fail.
Greater than or equal comparator.
Less than or equal comparator.
Operator to check if the expression does not throw any exception.
Operator to check if the expression throws a specific exception.