micro-test-plus 6.0.0
µTest++ Testing Framework
Loading...
Searching...
No Matches
extension.h File Reference

C++ header file with declarations for the µTest++ extension concepts. More...

#include <concepts>
#include <iterator>
#include <memory>
#include <optional>
#include <string_view>
#include <type_traits>
#include <utility>

Go to the source code of this file.

Classes

struct  micro_os_plus::micro_test_plus::detail::is_bool_wrapper< T >
 Trait marking the wrappers of a bool, whose condition is ambiguous. More...
struct  micro_os_plus::micro_test_plus::detail::op
 Empty base struct for the framework expression types. More...
struct  micro_os_plus::micro_test_plus::detail::range_element< T >
 The type of the elements of a range with begin() and end() members. More...

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.
namespace  micro_os_plus::micro_test_plus::extension
 The templates and the concepts for extending the µTest++ testing framework.

Concepts

concept  micro_os_plus::micro_test_plus::detail::ambiguous_condition
 Concept satisfied by the wrappers of a bool, whose condition is ambiguous.
concept  micro_os_plus::micro_test_plus::detail::container_like
 Concept satisfied when T provides both begin() and end() member functions returning an iterator and its sentinel.
concept  micro_os_plus::micro_test_plus::detail::formattable_range
 Concept satisfied when T is a range that the formatter writes element by element.
concept  micro_os_plus::micro_test_plus::detail::free_range
 Concept satisfied when T provides begin() and end() only as functions found by argument-dependent lookup.
concept  micro_os_plus::micro_test_plus::detail::has_value
 Concept satisfied when T is a framework compile-time constant.
concept  micro_os_plus::micro_test_plus::detail::lazy_message
 Concept satisfied when T is a callable object that returns a printable message.
concept  micro_os_plus::micro_test_plus::detail::legacy_checkable
 Concept satisfied when a type was accepted by expect() and require() before the exclusion of the suspicious conditions.
concept  micro_os_plus::micro_test_plus::detail::message_argument
 Concept satisfied when T can be appended to the message of a check.
concept  micro_os_plus::micro_test_plus::detail::string_like
 Concept satisfied when T is a string, convertible to a std::basic_string_view of a character type.
concept  micro_os_plus::micro_test_plus::detail::suspicious_condition
 Concept satisfied when a type is contextually convertible to bool, but is most likely not a condition.
concept  micro_os_plus::micro_test_plus::extension::any_op
 Concept satisfied when at least one of two types is a framework expression type.
concept  micro_os_plus::micro_test_plus::extension::checkable
 Concept satisfied when a type can be used as a test expression in expect() or require().
concept  micro_os_plus::micro_test_plus::extension::compare_tag
 Concept satisfied by a tag that defines a custom comparator.
concept  micro_os_plus::micro_test_plus::extension::has_epsilon
 Deprecated concept satisfied when T is a framework floating-point wrapper with a tolerance.
concept  micro_os_plus::micro_test_plus::extension::is_op
 Concept satisfied when a type is a framework expression type.
concept  micro_os_plus::micro_test_plus::extension::predicate_tag
 Concept satisfied by a tag that defines a custom predicate.
concept  micro_os_plus::micro_test_plus::extension::printable
 Concept satisfied when a type can be appended to the message of a check result via operator<<.

Detailed Description

This header provides the C++20 concepts that the applications use to extend the framework with their own comparators, operators, and helpers (the expressions they return, extension::compare_op and extension::predicate_op, are declared in detail.h): the concepts that detect the framework expression types, and the types accepted by expect(), require(), and the message operator.

The public concepts, and the templates compare_op and predicate_op, reside within the micro_os_plus::micro_test_plus::extension namespace, separate from the top namespace, so that using namespace on the top namespace does not bring their generic names into the application code.

The concepts used only by the implementation, which detect the framework constants, the containers, and the strings, reside within the detail namespace.

The marker base detail::op of the framework expression types is defined here; the deprecated value wrappers, in the detail namespace, are declared in deprecated.h.

The deprecated v5.0.1 type_traits namespace, which refers to these concepts and to the value wrappers, is declared in deprecated.h.

This file is included by micro-os-plus/micro-test-plus.h, which is the header that the applications include.

Definition in file extension.h.