Pass writer directly to format_value (#400)

This commit is contained in:
Victor Zverovich
2016-10-26 17:54:11 -07:00
parent b656a1c133
commit 2bba420337
8 changed files with 76 additions and 89 deletions

View File

@@ -567,9 +567,9 @@ TEST(ArgTest, MakeArg) {
EXPECT_EQ(fmt::internal::Arg::CUSTOM, arg.type);
EXPECT_EQ(&t, arg.custom.value);
fmt::MemoryWriter w;
fmt::basic_formatter<char> formatter(fmt::format_args(), w);
fmt::basic_formatter<char> formatter((fmt::format_args()));
const char *s = "}";
arg.custom.format(&formatter.writer(), &formatter, &t, &s);
arg.custom.format(&w, &formatter, &t, &s);
EXPECT_EQ("test", w.str());
}