mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-05 12:04:11 +02:00
Make format_to work with basic_memory_buffer (#776)
This commit is contained in:
@@ -233,6 +233,12 @@ TEST(FormatToTest, FormatToNonbackInsertIteratorWithSignAndNumericAlignment) {
|
||||
EXPECT_STREQ("+42", buffer);
|
||||
}
|
||||
|
||||
TEST(FormatToTest, FormatToMemoryBuffer) {
|
||||
fmt::basic_memory_buffer<char, 100> buffer;
|
||||
fmt::format_to(buffer, "{}", "foo");
|
||||
EXPECT_EQ("foo", to_string(buffer));
|
||||
}
|
||||
|
||||
TEST(FormatterTest, Escape) {
|
||||
EXPECT_EQ("{", format("{{"));
|
||||
EXPECT_EQ("before {", format("before {{"));
|
||||
|
||||
Reference in New Issue
Block a user