mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-03 19:30:47 +02:00
More iterator support & fmt::count
This commit is contained in:
+5
-1
@@ -1910,7 +1910,7 @@ TEST(FormatTest, ToString) {
|
||||
EXPECT_EQ("42", fmt::to_string(42));
|
||||
}
|
||||
|
||||
TEST(WriterTest, OutputIterators) {
|
||||
TEST(FormatTest, OutputIterators) {
|
||||
std::list<char> out;
|
||||
fmt::format_to(std::back_inserter(out), "{}", 42);
|
||||
EXPECT_EQ("42", std::string(out.begin(), out.end()));
|
||||
@@ -1918,3 +1918,7 @@ TEST(WriterTest, OutputIterators) {
|
||||
fmt::format_to(std::ostream_iterator<char>(s), "{}", 42);
|
||||
EXPECT_EQ("42", s.str());
|
||||
}
|
||||
|
||||
TEST(FormatTest, OutputSize) {
|
||||
EXPECT_EQ(2, fmt::count("{}", 42));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user