Add printf overloads that takes a writer (#476)

This commit is contained in:
Victor Zverovich
2017-02-25 09:58:42 -08:00
parent db0d54f855
commit 6f8006c2ce
2 changed files with 14 additions and 3 deletions
+6
View File
@@ -500,3 +500,9 @@ TEST(PrintfTest, OStream) {
EXPECT_EQ("Don't panic!", os.str());
EXPECT_EQ(12, ret);
}
TEST(PrintfTest, Writer) {
fmt::MemoryWriter writer;
printf(writer, "%d", 42);
EXPECT_EQ("42", writer.str());
}