Simplify API

This commit is contained in:
Victor Zverovich
2017-02-05 06:41:39 -08:00
parent 7ae8bd7073
commit 624c58682d
11 changed files with 82 additions and 85 deletions
+3 -4
View File
@@ -59,17 +59,16 @@ TEST(OStreamTest, Enum) {
}
struct TestArgFormatter : fmt::ArgFormatter<char> {
TestArgFormatter(fmt::writer &w, fmt::format_context &ctx,
fmt::format_specs &s)
TestArgFormatter(fmt::writer &w, fmt::context &ctx, fmt::format_specs &s)
: fmt::ArgFormatter<char>(w, ctx, s) {}
};
TEST(OStreamTest, CustomArg) {
fmt::MemoryWriter writer;
fmt::format_context ctx("}", fmt::format_args());
fmt::context ctx("}", fmt::format_args());
fmt::format_specs spec;
TestArgFormatter af(writer, ctx, spec);
visit(af, fmt::internal::make_arg<fmt::format_context>(TestEnum()));
visit(af, fmt::internal::make_arg<fmt::context>(TestEnum()));
EXPECT_EQ("TestEnum", writer.str());
}