fix wrong order of expected and actual in truncated_printf_context test in PrintfDetermineOutputSize, make test of normal sprintf in a separate step
This commit is contained in:
parent
986fa00406
commit
6b65b5198d
@ -617,12 +617,14 @@ TEST(PrintfTest, PrintfDetermineOutputSize) {
|
||||
|
||||
const auto format_string = "%s";
|
||||
const auto format_arg = "Hello";
|
||||
const auto expected_size = fmt::sprintf(format_string, format_arg).size();
|
||||
const auto expected_size = 5;
|
||||
|
||||
EXPECT_EQ((truncated_printf_context(
|
||||
EXPECT_EQ(expected_size, fmt::sprintf(format_string, format_arg).size());
|
||||
|
||||
EXPECT_EQ(expected_size,
|
||||
(truncated_printf_context(
|
||||
fmt::detail::truncating_iterator<backit>(it, 0), format_string,
|
||||
fmt::make_format_args<truncated_printf_context>(format_arg))
|
||||
.format()
|
||||
.count()),
|
||||
expected_size);
|
||||
.count()));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user