#include <bdlt_formattestutil.h>
This struct serves as a namespace for static functions to facilitate testing of formatting of bdlt value types – used in the implementation of the above macros, and for conversion between bsl::string and bsl::wstring.
See bdlt_formattestutil
◆ narrow()
Convert the string referred to by the specified viewIn from wchar_t to char and return the resulting bsl::string by value.
- Precondition
- The behavior is undefined unless all of the
wchar_t values in viewIn are ascii.
◆ testFormat()
template<class t_VALUE_TYPE >
Compare the specified exp to the string result of calling bsl::format with the specified format and value, and return true if they match and false otherwise. If they do not match, load into the specified message a value describing the inputs and result of the failed test. Perform these tests for both char-based and wchar_t-based strings.
◆ testFormatArg()
template<class t_VALUE_TYPE , class t_ARG_TYPE >
Compare the specified exp to the string result of calling bsl::format with the specified format, value, and arg, and return true if they match and false otherwise. If they do not match, load into the specified message a value describing the inputs and result of the failed test. Perform these tests for both char-based and wchar_t-based strings.
◆ widen()
Load the wstring version of the specified char-based string view viewIn into the specified result.
- Precondition
- The behavior is undefined unless all of the
char values in viewIn are ascii.
The documentation for this struct was generated from the following file: