BloombergLP::bslfmt::FormatterTestUtil<wchar_t>::testEvaluateFormat

testEvaluateFormat overloads

Synopses

Declared in <bslfmt_formattertestutil.h>

Compare expectedResult with formatting value via format.

template<class t_TYPE>
static
bool
testEvaluateFormat(
    bsl::string* message,
    bsl::basic_string_view<wchar_t> expectedResult,
    bool alsoTestOracle,
    std::wformat_string<t_TYPE> fmt,
    t_TYPE&& value);
» more...

Compare formatting of value and arg against expectedResult.

template<
    class t_TYPE,
    class t_ARG>
static
bool
testEvaluateFormat(
    bsl::string* message,
    bsl::basic_string_view<wchar_t> expectedResult,
    bool alsoTestOracle,
    std::wformat_string<t_TYPE, t_ARG> fmt,
    t_TYPE&& value,
    t_ARG&& arg);
» more...

Compare formatting of value, arg1, and arg2 against expectedResult.

template<
    class t_TYPE,
    class t_ARG_1,
    class t_ARG_2>
static
bool
testEvaluateFormat(
    bsl::string* message,
    bsl::basic_string_view<wchar_t> expectedResult,
    bool alsoTestOracle,
    std::wformat_string<t_TYPE, t_ARG_1, t_ARG_2> fmt,
    t_TYPE&& value,
    t_ARG_1&& arg1,
    t_ARG_2&& arg2);
» more...

Return Value

true if formatting matches expectedResult, else false.

Parameters

NameDescription
messageOutput parameter for an error description on failure.
expectedResultExpected formatted output string.
alsoTestOracleIf true, also compare against the standard library formatter.
fmtCompile-time format string.
valuePrimary value to format.
argAdditional format argument.
arg1First additional format argument.
arg2Second additional format argument.