mirror of
https://github.com/fmtlib/fmt.git
synced 2026-04-28 18:02:08 +02:00
FrmatSpec -> format_spec
This commit is contained in:
@@ -17,7 +17,7 @@ using fmt::PrintfArgFormatter;
|
||||
class CustomArgFormatter : public fmt::ArgFormatter<char> {
|
||||
public:
|
||||
CustomArgFormatter(fmt::writer &w, fmt::basic_format_context<char> &ctx,
|
||||
fmt::FormatSpec &s)
|
||||
fmt::format_specs &s)
|
||||
: fmt::ArgFormatter<char>(w, ctx, s) {}
|
||||
|
||||
using fmt::ArgFormatter<char>::operator();
|
||||
@@ -33,7 +33,7 @@ class CustomArgFormatter : public fmt::ArgFormatter<char> {
|
||||
// rounded to 0.
|
||||
class CustomPrintfArgFormatter : public PrintfArgFormatter<char> {
|
||||
public:
|
||||
CustomPrintfArgFormatter(fmt::basic_writer<char> &w, fmt::FormatSpec &spec)
|
||||
CustomPrintfArgFormatter(fmt::basic_writer<char> &w, fmt::format_specs &spec)
|
||||
: PrintfArgFormatter<char>(w, spec) {}
|
||||
|
||||
using PrintfArgFormatter<char>::operator();
|
||||
|
||||
+1
-1
@@ -1644,7 +1644,7 @@ class MockArgFormatter : public fmt::internal::ArgFormatterBase<char> {
|
||||
typedef fmt::internal::ArgFormatterBase<char> Base;
|
||||
|
||||
MockArgFormatter(fmt::writer &w, fmt::format_context &ctx,
|
||||
fmt::FormatSpec &s)
|
||||
fmt::format_specs &s)
|
||||
: fmt::internal::ArgFormatterBase<char>(w, s) {
|
||||
EXPECT_CALL(*this, call(42));
|
||||
}
|
||||
|
||||
@@ -60,14 +60,14 @@ TEST(OStreamTest, Enum) {
|
||||
|
||||
struct TestArgFormatter : fmt::ArgFormatter<char> {
|
||||
TestArgFormatter(fmt::writer &w, fmt::format_context &ctx,
|
||||
fmt::FormatSpec &s)
|
||||
fmt::format_specs &s)
|
||||
: fmt::ArgFormatter<char>(w, ctx, s) {}
|
||||
};
|
||||
|
||||
TEST(OStreamTest, CustomArg) {
|
||||
fmt::MemoryWriter writer;
|
||||
fmt::format_context ctx("}", fmt::format_args());
|
||||
fmt::FormatSpec spec;
|
||||
fmt::format_specs spec;
|
||||
TestArgFormatter af(writer, ctx, spec);
|
||||
visit(af, fmt::internal::make_arg<fmt::format_context>(TestEnum()));
|
||||
EXPECT_EQ("TestEnum", writer.str());
|
||||
|
||||
Reference in New Issue
Block a user