mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-03 15:41:53 +01:00
Update format_to taking a buffer and remove undocumented vformat_to overload
This commit is contained in:
@@ -308,7 +308,7 @@ TEST(format_impl_test, format_error_code) {
|
||||
std::string msg = "error 42", sep = ": ";
|
||||
{
|
||||
fmt::memory_buffer buffer;
|
||||
format_to(buffer, "garbage");
|
||||
format_to(fmt::appender(buffer), "garbage");
|
||||
fmt::detail::format_error_code(buffer, 42, "test");
|
||||
EXPECT_EQ("test: " + msg, to_string(buffer));
|
||||
}
|
||||
|
||||
@@ -1664,7 +1664,7 @@ TEST(format_test, join_bytes) {
|
||||
std::string vformat_message(int id, const char* format, fmt::format_args args) {
|
||||
fmt::memory_buffer buffer;
|
||||
format_to(buffer, "[{}] ", id);
|
||||
vformat_to(buffer, format, args);
|
||||
vformat_to(fmt::appender(buffer), format, args);
|
||||
return to_string(buffer);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,12 +42,6 @@ TEST(wchar_test, vformat_to) {
|
||||
EXPECT_EQ(L"42", w);
|
||||
}
|
||||
|
||||
TEST(wchar_test, format_to_memory_buffer) {
|
||||
auto buf = fmt::wmemory_buffer();
|
||||
fmt::format_to(buf, L"{}", L"foo");
|
||||
EXPECT_EQ(L"foo", to_string(buf));
|
||||
}
|
||||
|
||||
TEST(format_test, wide_format_to_n) {
|
||||
wchar_t buffer[4];
|
||||
buffer[3] = L'x';
|
||||
|
||||
Reference in New Issue
Block a user