More iterator support
This commit is contained in:
@@ -59,17 +59,15 @@ TEST(OStreamTest, Enum) {
|
||||
}
|
||||
|
||||
struct test_arg_formatter : fmt::arg_formatter<fmt::context::range_type> {
|
||||
using base = fmt::arg_formatter<fmt::context::range_type>;
|
||||
test_arg_formatter(fmt::internal::buffer &buf, fmt::context &ctx,
|
||||
fmt::format_specs &s)
|
||||
: base(buf, ctx, s) {}
|
||||
test_arg_formatter(fmt::context &ctx, fmt::format_specs &s)
|
||||
: fmt::arg_formatter<fmt::context::range_type>(ctx, s) {}
|
||||
};
|
||||
|
||||
TEST(OStreamTest, CustomArg) {
|
||||
fmt::memory_buffer buffer;
|
||||
fmt::context ctx(buffer, "", fmt::format_args());
|
||||
fmt::format_specs spec;
|
||||
test_arg_formatter af(buffer, ctx, spec);
|
||||
test_arg_formatter af(ctx, spec);
|
||||
visit(af, fmt::internal::make_arg<fmt::context>(TestEnum()));
|
||||
EXPECT_EQ("TestEnum", std::string(buffer.data(), buffer.size()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user