|
micro-test-plus 6.0.1
µTest++ Testing Framework
|
C++ source file with non-template implementations for the µTest++ expression formatter. More...
#include "micro-os-plus/micro-test-plus/expression-formatter.h"#include "micro-os-plus/micro-test-plus/deprecated.h"#include <cmath>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. | |
| namespace | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp} |
| Local helpers of the expression formatter. | |
Functions | |
| void | micro_os_plus::micro_test_plus::detail::append_control_escape (std::string &text, char c) |
| Appends the escape sequence of a control character. | |
| void | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp}::append_hex (std::string &buffer, char32_t code, std::string_view escape, std::size_t count) |
| Appends an escape and a fixed number of hexadecimal digits. | |
| void | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp}::append_plain (std::string &buffer, std::string_view sv) |
| Appends a text in the plain mode, with the control characters escaped. | |
| void | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp}::append_quoted (std::string &buffer, std::string_view sv) |
| Appends a string, as a quoted literal. | |
| void | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp}::append_utf8 (std::string &text, char32_t code) |
| Appends a code point to a text, as UTF-8. | |
| template<class Char_T> | |
| void | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp}::append_wide_text (std::string &buffer, std::basic_string_view< Char_T > sv) |
| Appends the text of a string of a wide character type, converted to UTF-8, as the char text is appended. | |
| template<class Char_T> | |
| std::basic_string_view< Char_T > | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp}::bounded_view (const Char_T *s, std::size_t capacity) noexcept |
| Returns the text of a C string held in a buffer of a known capacity. | |
| constexpr bool | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp}::is_escaped_in_plain (char c) noexcept |
| Tells whether a character is escaped in the plain mode. | |
| template<class Char_T> | |
| std::string | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp}::utf16_to_utf8 (std::basic_string_view< Char_T > sv) |
| Converts a UTF-16 text to UTF-8. | |
| template<class Char_T> | |
| std::string | micro_os_plus::micro_test_plus::detail::anonymous_namespace{expression-formatter.cpp}::utf32_to_utf8 (std::basic_string_view< Char_T > sv) |
| Converts a UTF-32 text to UTF-8. | |
This source file contains the non-template operator<< overloads of expression_formatter for all standard arithmetic, character, string, boolean, and null-pointer types, std::nullopt, and the named_bool operand. Each overload appends the formatted value — together with an appropriate type suffix where applicable — to the internal string buffer. It also contains the private helpers that write the decimal point, the suffixes, and the characters, and the functions that assign the buffer to the checks.
All definitions reside within the micro_os_plus::micro_test_plus::detail namespace.
This file must be included when building the µTest++ library.
Definition in file expression-formatter.cpp.