mirror of
https://github.com/fmtlib/fmt.git
synced 2026-04-28 18:02:08 +02:00
BasicWriter -> basic_writer
This commit is contained in:
@@ -16,7 +16,7 @@ using fmt::PrintfArgFormatter;
|
||||
// rounded to 0.
|
||||
class CustomArgFormatter : public fmt::ArgFormatter<char> {
|
||||
public:
|
||||
CustomArgFormatter(fmt::Writer &w, fmt::basic_format_context<char> &ctx,
|
||||
CustomArgFormatter(fmt::writer &w, fmt::basic_format_context<char> &ctx,
|
||||
fmt::FormatSpec &s)
|
||||
: fmt::ArgFormatter<char>(w, ctx, s) {}
|
||||
|
||||
@@ -33,7 +33,7 @@ class CustomArgFormatter : public fmt::ArgFormatter<char> {
|
||||
// rounded to 0.
|
||||
class CustomPrintfArgFormatter : public PrintfArgFormatter<char> {
|
||||
public:
|
||||
CustomPrintfArgFormatter(fmt::BasicWriter<char> &w, fmt::FormatSpec &spec)
|
||||
CustomPrintfArgFormatter(fmt::basic_writer<char> &w, fmt::FormatSpec &spec)
|
||||
: PrintfArgFormatter<char>(w, spec) {}
|
||||
|
||||
using PrintfArgFormatter<char>::operator();
|
||||
|
||||
+9
-9
@@ -70,7 +70,7 @@ lconv *localeconv() {
|
||||
|
||||
using std::size_t;
|
||||
|
||||
using fmt::BasicWriter;
|
||||
using fmt::basic_writer;
|
||||
using fmt::format;
|
||||
using fmt::format_error;
|
||||
using fmt::StringRef;
|
||||
@@ -165,11 +165,11 @@ TEST(CStringRefTest, Ctor) {
|
||||
|
||||
#if FMT_USE_TYPE_TRAITS
|
||||
TEST(WriterTest, NotCopyConstructible) {
|
||||
EXPECT_FALSE(std::is_copy_constructible<BasicWriter<char> >::value);
|
||||
EXPECT_FALSE(std::is_copy_constructible<basic_writer<char> >::value);
|
||||
}
|
||||
|
||||
TEST(WriterTest, NotCopyAssignable) {
|
||||
EXPECT_FALSE(std::is_copy_assignable<BasicWriter<char> >::value);
|
||||
EXPECT_FALSE(std::is_copy_assignable<basic_writer<char> >::value);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -399,7 +399,7 @@ TEST(WriterTest, hexu) {
|
||||
}
|
||||
|
||||
template <typename Char>
|
||||
BasicWriter<Char> &operator<<(BasicWriter<Char> &f, const Date &d) {
|
||||
basic_writer<Char> &operator<<(basic_writer<Char> &f, const Date &d) {
|
||||
return f << d.year() << '-' << d.month() << '-' << d.day();
|
||||
}
|
||||
|
||||
@@ -410,8 +410,8 @@ public:
|
||||
ISO8601DateFormatter(const Date &d) : date_(&d) {}
|
||||
|
||||
template <typename Char>
|
||||
friend BasicWriter<Char> &operator<<(
|
||||
BasicWriter<Char> &w, const ISO8601DateFormatter &d) {
|
||||
friend basic_writer<Char> &operator<<(
|
||||
basic_writer<Char> &w, const ISO8601DateFormatter &d) {
|
||||
return w << pad(d.date_->year(), 4, '0') << '-'
|
||||
<< pad(d.date_->month(), 2, '0') << '-' << pad(d.date_->day(), 2, '0');
|
||||
}
|
||||
@@ -1355,7 +1355,7 @@ TEST(FormatterTest, FormatCStringRef) {
|
||||
EXPECT_EQ("test", format("{0}", CStringRef("test")));
|
||||
}
|
||||
|
||||
void format_value(fmt::Writer &w, const Date &d, fmt::format_context &) {
|
||||
void format_value(fmt::writer &w, const Date &d, fmt::format_context &) {
|
||||
w << d.year() << '-' << d.month() << '-' << d.day();
|
||||
}
|
||||
|
||||
@@ -1368,7 +1368,7 @@ TEST(FormatterTest, FormatCustom) {
|
||||
class Answer {};
|
||||
|
||||
template <typename Char>
|
||||
void format_value(BasicWriter<Char> &w, Answer, fmt::format_context &) {
|
||||
void format_value(basic_writer<Char> &w, Answer, fmt::format_context &) {
|
||||
w << "42";
|
||||
}
|
||||
|
||||
@@ -1627,7 +1627,7 @@ class MockArgFormatter : public fmt::internal::ArgFormatterBase<char> {
|
||||
public:
|
||||
typedef fmt::internal::ArgFormatterBase<char> Base;
|
||||
|
||||
MockArgFormatter(fmt::Writer &w, fmt::format_context &ctx,
|
||||
MockArgFormatter(fmt::writer &w, fmt::format_context &ctx,
|
||||
fmt::FormatSpec &s)
|
||||
: fmt::internal::ArgFormatterBase<char>(w, s) {
|
||||
EXPECT_CALL(*this, call(42));
|
||||
|
||||
@@ -59,7 +59,7 @@ TEST(OStreamTest, Enum) {
|
||||
}
|
||||
|
||||
struct TestArgFormatter : fmt::ArgFormatter<char> {
|
||||
TestArgFormatter(fmt::Writer &w, fmt::format_context &ctx,
|
||||
TestArgFormatter(fmt::writer &w, fmt::format_context &ctx,
|
||||
fmt::FormatSpec &s)
|
||||
: fmt::ArgFormatter<char>(w, ctx, s) {}
|
||||
};
|
||||
@@ -134,7 +134,7 @@ TEST(OStreamTest, WriteToOStreamMaxSize) {
|
||||
if (max_size <= fmt::internal::to_unsigned(max_streamsize))
|
||||
return;
|
||||
|
||||
class TestWriter : public fmt::BasicWriter<char> {
|
||||
class TestWriter : public fmt::basic_writer<char> {
|
||||
private:
|
||||
struct TestBuffer : fmt::Buffer<char> {
|
||||
explicit TestBuffer(std::size_t size) { size_ = size; }
|
||||
@@ -142,7 +142,7 @@ TEST(OStreamTest, WriteToOStreamMaxSize) {
|
||||
} buffer_;
|
||||
public:
|
||||
explicit TestWriter(std::size_t size)
|
||||
: fmt::BasicWriter<char>(buffer_), buffer_(size) {}
|
||||
: fmt::basic_writer<char>(buffer_), buffer_(size) {}
|
||||
} w(max_size);
|
||||
|
||||
struct MockStreamBuf : std::streambuf {
|
||||
|
||||
+3
-3
@@ -68,7 +68,7 @@ namespace {
|
||||
struct Test {};
|
||||
|
||||
template <typename Char>
|
||||
void format_value(fmt::BasicWriter<Char> &w, Test,
|
||||
void format_value(fmt::basic_writer<Char> &w, Test,
|
||||
fmt::basic_format_context<Char> &) {
|
||||
w << "test";
|
||||
}
|
||||
@@ -417,7 +417,7 @@ struct CustomContext {
|
||||
bool called;
|
||||
};
|
||||
|
||||
void format_value(fmt::Writer &, const Test &, CustomContext &ctx) {
|
||||
void format_value(fmt::writer &, const Test &, CustomContext &ctx) {
|
||||
ctx.called = true;
|
||||
}
|
||||
|
||||
@@ -690,7 +690,7 @@ TEST(UtilTest, UTF16ToUTF8Convert) {
|
||||
#endif // _WIN32
|
||||
|
||||
typedef void (*FormatErrorMessage)(
|
||||
fmt::Writer &out, int error_code, StringRef message);
|
||||
fmt::writer &out, int error_code, StringRef message);
|
||||
|
||||
template <typename Error>
|
||||
void check_throw_error(int error_code, FormatErrorMessage format) {
|
||||
|
||||
Reference in New Issue
Block a user