53#ifndef MICRO_TEST_PLUS_MICRO_TEST_PLUS_H_
54#define MICRO_TEST_PLUS_MICRO_TEST_PLUS_H_
62#if defined(MICRO_OS_PLUS_INCLUDE_CONFIG_H)
63#include <micro-os-plus/config.h>
83#pragma GCC diagnostic push
84#pragma GCC diagnostic ignored "-Wpadded"
85#pragma GCC diagnostic ignored "-Waggregate-return"
87#pragma clang diagnostic ignored "-Wc++98-compat"
88#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
89#pragma clang diagnostic ignored "-Wctad-maybe-unsupported"
140 initialize (
int argc,
char* argv[],
const char* name =
"Main");
168 template <
typename Callable_T,
typename... Args_T>
170 test_case (
const char* name, Callable_T&& callable, Args_T&&... arguments);
212#if defined(__cpp_exceptions)
224 template <
class Exception_T,
class Callable_T>
225 [[nodiscard]]
constexpr auto
226 throws (
const Callable_T& func);
237 template <
class Callable_T>
238 [[nodiscard]]
constexpr auto
239 throws (
const Callable_T& func);
249 template <
class Callable_T>
250 [[nodiscard]]
constexpr auto
251 nothrow (
const Callable_T& func);
287 is_match (std::string_view input, std::string_view pattern);
300 template <
class T,
class Delim_T>
302 split (T input, Delim_T delim) -> std::vector<T>;
311#pragma GCC diagnostic pop
Local implementation of source location information for diagnostics.
static constexpr auto current(const char *file="unknown", unsigned int line={}) noexcept
Obtain the current source location.
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.
C++ header file with declarations for the µTest++ internals.
C++ header file with inline implementations for the µTest++ internals.
C++ header file with inline implementations for the µTest++ function comparators.
C++ header file with declarations for the µTest++ function comparators.
constexpr auto assume(const Expr_T &expr, const reflection::source_location &sl=reflection::source_location::current())
Check a condition and, if false, abort test execution.
constexpr auto nothrow(const Callable_T &func)
Check if a callable does not throw an exception.
constexpr auto expect(const Expr_T &expr, const reflection::source_location &sl=reflection::source_location::current())
Evaluate a generic condition and report the results.
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.
void test_case(const char *name, Callable_T &&callable, Args_T &&... arguments)
Define and execute a test case.
auto split(T input, Delim_T delim) -> std::vector< T >
Split a string into a vector of sub-strings.
bool is_match(std::string_view input, std::string_view pattern)
Check if a string matches a pattern.
C++ header file with inline implementations for the µTest++ literals and type wrappers.
C++ header file with declarations for the µTest++ user-defined literals and type wrappers.
C++ header file with inline implementations for the µTest++ mathematical utilities.
C++ header file with declarations for the µTest++ mathematical utilities.
C++ header file with inline implementations for the µTest++ Testing Framework.
typename requires_< Cond >::type requires_t
Alias template for extracting the type member from requires_.
constexpr auto is_convertible_v
Variable template to determine if one type is convertible to another.
constexpr auto is_op_v
Variable template to determine if a type derives from op.
Utility functions for the µTest++ testing framework.
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.
C++ header file with declarations for the µTest++ operators.
C++ header file with inline implementations for the µTest++ reflection utilities.
C++ header file with declarations for the µTest++ reflection utilities.
C++ header file with inline implementations for the µTest++ test reporter.
C++ header file with declarations for the µTest++ test reporter.
C++ header file with declarations for the µTest++ test runner.
C++ header file with inline implementations for the µTest++ test suite.
C++ header file with declarations for the µTest++ test suite.
C++ header file with declarations for the µTest++ type trait utilities and metaprogramming support.