43#if defined(MICRO_OS_PLUS_INCLUDE_CONFIG_H)
44#include <micro-os-plus/config.h>
55#pragma GCC diagnostic ignored "-Waggregate-return"
57#pragma clang diagnostic ignored "-Wc++98-compat"
58#pragma clang diagnostic ignored "-Wexit-time-destructors"
59#pragma clang diagnostic ignored "-Wglobal-constructors"
60#pragma clang diagnostic ignored "-Wunknown-warning-option"
83#if defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
84 printf (
"%s\n", __PRETTY_FUNCTION__);
86 runner.initialize (argc, argv, name);
110 return runner.exit_code ();
130#pragma GCC diagnostic push
131#if defined(__clang__)
132#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
134 const char* p = strrchr (name,
'/');
139#pragma GCC diagnostic pop
146#if defined(__clang__)
147#pragma clang diagnostic push
148#pragma clang diagnostic ignored "-Wdocumentation"
167#if defined(__clang__)
168#pragma clang diagnostic pop
171 is_match (std::string_view input, std::string_view pattern)
173 if (std::empty (pattern))
175 return std::empty (input);
178 if (std::empty (input))
180 return pattern[0] ==
'*' ?
is_match (input, pattern.substr (1))
184 if (pattern[0] !=
'?' and pattern[0] !=
'*' and pattern[0] != input[0])
189 if (pattern[0] ==
'*')
191 for (
decltype (std::size (input)) i = 0u; i <= std::size (input);
194 if (
is_match (input.substr (i), pattern.substr (1)))
202 return is_match (input.substr (1), pattern.substr (1));
243 printf (
"%s\n", __PRETTY_FUNCTION__);
259#pragma GCC diagnostic push
260#if defined(__clang__)
261#pragma clang diagnostic ignored "-Wexit-time-destructors"
262#pragma clang diagnostic ignored "-Wglobal-constructors"
309#pragma GCC diagnostic pop
const reflection::source_location location_
Stores the source location associated with the report.
constexpr bool value() const
Retrieves the result value.
~deferred_reporter_base()
Destructor for the deferred reporter base.
bool abort_
Indicates whether the reporting should abort further processing.
deferred_reporter_base(bool value, const reflection::source_location location)
Constructs a deferred reporter base.
bool value_
Stores the result value of the report.
Local implementation of source location information for diagnostics.
Reporter to display test results, including operand values and types for failures.
The test runner for the µTest++ framework.
Base class for all test suites.
int exit_code(void)
Complete the test run and return the exit code.
void initialize(int argc, char *argv[], const char *name="Main")
Initialise the µTest++ framework.
bool is_match(std::string_view input, std::string_view pattern)
Check if a string matches a pattern.
Main C++ header with the declarations for the µTest++ Testing Framework.
const char * short_name(const char *name)
Extract a short type or function name from a fully qualified name.
Primary namespace for the µTest++ testing framework.
test_runner runner
Global instance of test_runner.
test_suite_base * current_test_suite
Global pointer references the currently active test suite.
test_reporter reporter
Global instance of test_reporter.