mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-01 14:41:43 +01:00
Use correct capacity in iterator_buffer (#1807)
This commit is contained in:
@@ -1946,6 +1946,12 @@ TEST(FormatTest, FormattedSize) {
|
||||
EXPECT_EQ(2u, fmt::formatted_size("{}", 42));
|
||||
}
|
||||
|
||||
TEST(FormatTest, FormatTo) {
|
||||
std::vector<char> v;
|
||||
fmt::format_to(std::back_inserter(v), "{}", "foo");
|
||||
EXPECT_EQ(string_view(v.data(), v.size()), "foo");
|
||||
}
|
||||
|
||||
TEST(FormatTest, FormatToN) {
|
||||
char buffer[4];
|
||||
buffer[3] = 'x';
|
||||
|
||||
Reference in New Issue
Block a user