|
micro-test-plus 6.0.1
µTest++ Testing Framework
|
C++ header file with inline implementations for the µTest++ test hierarchy. More...
#include "micro-os-plus/micro-test-plus/check-result.h"#include "micro-os-plus/micro-test-plus/detail.h"#include "micro-os-plus/micro-test-plus/reporter.h"#include <cstdio>#include <cstring>#include <exception>Go to the source code of this file.
Namespaces | |
| namespace | micro_os_plus |
| The primary namespace for the µOS++ framework. | |
| namespace | micro_os_plus::micro_test_plus |
| Primary namespace for the µTest++ testing framework. | |
| namespace | micro_os_plus::micro_test_plus::detail |
| Internal implementation details for the µTest++ framework. | |
Functions | |
| template<typename Self_T, typename Callable_T, typename... Args_T> | |
| auto | micro_os_plus::micro_test_plus::detail::bind_callable (Callable_T &&callable, Args_T &&... arguments) |
| Creates the function object that holds the body of a test case or suite. | |
| template<typename Callable_T, typename... Args_T> | |
| constexpr void | micro_os_plus::micro_test_plus::detail::reject_suite_body (void) noexcept |
| Stops the compilation with a message that tells what the body of a suite takes. | |
| template<typename Callable_T, typename... Args_T> | |
| constexpr void | micro_os_plus::micro_test_plus::detail::reject_test_body (void) noexcept |
| Stops the compilation with a message that tells what the body of a test case takes. | |
| template<class Self_T, class Values_T, class Callable_T> | |
| void | micro_os_plus::micro_test_plus::detail::test_each_value (Self_T &self, const located_name &name, Values_T &&values, Callable_T &callable) |
| Adds and runs a test case for each value. | |
This header provides the inline and template implementations for the test hierarchy used within the µTest++ framework: the accessors of the base classes, the constructors that bind the callable objects and their arguments, the test() member functions that create and run test cases, and the expect() and require() checks.
When additional arguments are given, a detail::bound_callable holds copies of the callable and of the arguments. The suites store this object in a std::function, while the test cases only refer to it, through a detail::callable_ref, as a local object of the test() call that runs them. A static_suite additionally inserts itself into the list of suites upon construction.
All definitions reside within the micro_os_plus::micro_test_plus namespace.
This file is included by test.h; the applications include micro-os-plus/micro-test-plus.h, not this file.
Definition in file test-inlines.h.