mirror of
https://github.com/fmtlib/fmt.git
synced 2026-05-04 19:44:09 +02:00
Deprecate c_str() and str().
This commit is contained in:
+3
-3
@@ -184,7 +184,7 @@ void CheckErrorSink(int error_code, FormatErrorMessage format) {
|
||||
}
|
||||
fmt::Writer message;
|
||||
format(message, error_code, "test");
|
||||
EXPECT_EQ(str(message), error.what());
|
||||
EXPECT_EQ(message.str(), error.what());
|
||||
EXPECT_EQ(error_code, error.error_code());
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ void CheckThrowError(int error_code, FormatErrorMessage format,
|
||||
}
|
||||
fmt::Writer message;
|
||||
format(message, error_code, "test error");
|
||||
EXPECT_EQ(str(message), error.what());
|
||||
EXPECT_EQ(message.str(), error.what());
|
||||
EXPECT_EQ(error_code, error.error_code());
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ TEST(UtilTest, FormatSystemErrorMessage) {
|
||||
fmt::Writer message;
|
||||
fmt::internal::FormatSystemErrorMessage(message, EDOM, "test");
|
||||
EXPECT_EQ(fmt::format("test: {}",
|
||||
GetSystemErrorMessage(EDOM)), fmt::str(message));
|
||||
GetSystemErrorMessage(EDOM)), message.str());
|
||||
}
|
||||
|
||||
TEST(UtilTest, SystemErrorSink) {
|
||||
|
||||
Reference in New Issue
Block a user