Compare formatting of value, arg1, and arg2 against expectedResult via vformat.
Synopsis
Declared in <bslfmt_formattertestutil.h>
template<
class t_TYPE,
class t_ARG_1,
class t_ARG_2>
static
bool
testEvaluateVFormat(
bsl::string* message,
bsl::basic_string_view<wchar_t> expectedResult,
bool alsoTestOracle,
bsl::basic_string_view<wchar_t> fmt,
t_TYPE&& value,
t_ARG_1&& arg1,
t_ARG_2&& arg2);
Description
Compare the specified expectedResult with the result of formatting the specified value, arg1, and arg2 with the specified fmt obtained using a bslfmt::formatter specialization for the (template parameter) t_TYPE. If the specified alsoTestOracle is true, also compare the expectedResult with the result of formatting obtained using a standard library implementation. Return true if these strings are equal, otherwise store a description of the error in the specified output message and return false. Note that fmt can be determined at runtime.
Return Value
true if formatting matches expectedResult, else false.
Parameters
Name |
Description |
message |
Output parameter for an error description on failure. |
expectedResult |
Expected formatted output string. |
alsoTestOracle |
If |
fmt |
Runtime format string (two additional arguments). |
value |
Primary value to format. |
arg1 |
First additional format argument. |
arg2 |
Second additional format argument. |
Created with MrDocs