Document the write API.

This commit is contained in:
Victor Zverovich
2013-01-22 11:06:56 -08:00
parent abe75da869
commit dbfd021ae2
3 changed files with 52 additions and 2 deletions

View File

@@ -917,6 +917,9 @@ TEST(FormatterTest, FormatterAppend) {
}
TEST(FormatterTest, FormatterExamples) {
using fmt::hex;
EXPECT_EQ("0000cafe", str(BasicFormatter() << pad(hex(0xcafe), 8, '0')));
std::string message = str(Format("The answer is {}") << 42);
EXPECT_EQ("The answer is 42", message);