Commit 0914c912 authored by Victor Zverovich's avatar Victor Zverovich

Don't use deprecated API.

parent 421cb0ad
...@@ -1611,7 +1611,7 @@ template <typename Char, typename T> ...@@ -1611,7 +1611,7 @@ template <typename Char, typename T>
void format(BasicWriter<Char> &w, const FormatSpec &spec, const T &value) { void format(BasicWriter<Char> &w, const FormatSpec &spec, const T &value) {
std::basic_ostringstream<Char> os; std::basic_ostringstream<Char> os;
os << value; os << value;
w.Write(os.str(), spec); w.write(os.str(), spec);
} }
namespace internal { namespace internal {
......
...@@ -1324,7 +1324,7 @@ class Answer {}; ...@@ -1324,7 +1324,7 @@ class Answer {};
template <typename Char> template <typename Char>
void format(BasicWriter<Char> &w, const fmt::FormatSpec &spec, Answer) { void format(BasicWriter<Char> &w, const fmt::FormatSpec &spec, Answer) {
w.Write("42", spec); w.write("42", spec);
} }
TEST(FormatterTest, CustomFormat) { TEST(FormatterTest, CustomFormat) {
......
...@@ -206,8 +206,8 @@ void CheckThrowError(int error_code, FormatErrorMessage format, ...@@ -206,8 +206,8 @@ void CheckThrowError(int error_code, FormatErrorMessage format,
TEST(UtilTest, FormatSystemErrorMessage) { TEST(UtilTest, FormatSystemErrorMessage) {
fmt::Writer message; fmt::Writer message;
fmt::internal::FormatSystemErrorMessage(message, EDOM, "test"); fmt::internal::FormatSystemErrorMessage(message, EDOM, "test");
EXPECT_EQ(str(fmt::Format("test: {}") EXPECT_EQ(str(fmt::format("test: {}",
<< GetSystemErrorMessage(EDOM)), fmt::str(message)); GetSystemErrorMessage(EDOM))), fmt::str(message));
} }
TEST(UtilTest, SystemErrorSink) { TEST(UtilTest, SystemErrorSink) {
...@@ -240,7 +240,7 @@ TEST(UtilTest, FormatWinErrorMessage) { ...@@ -240,7 +240,7 @@ TEST(UtilTest, FormatWinErrorMessage) {
fmt::Writer actual_message; fmt::Writer actual_message;
fmt::internal::FormatWinErrorMessage( fmt::internal::FormatWinErrorMessage(
actual_message, ERROR_FILE_EXISTS, "test"); actual_message, ERROR_FILE_EXISTS, "test");
EXPECT_EQ(str(fmt::Format("test: {}") << fmt::str(utf8_message)), EXPECT_EQ(str(fmt::format("test: {}", fmt::str(utf8_message))),
fmt::str(actual_message)); fmt::str(actual_message));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment