Commit b8174bec authored by Victor Zverovich's avatar Victor Zverovich

Use Kill-o-Zap

parent 39166f9a
......@@ -171,23 +171,6 @@ TEST(UtilTest, SystemError) {
typedef void (*FormatErrorMessage)(
fmt::Writer &out, int error_code, StringRef message);
template <typename Sink>
void CheckErrorSink(int error_code, FormatErrorMessage format) {
fmt::SystemError error(0, "");
Sink sink(error_code);
fmt::Writer w;
w << "test";
try {
sink(w);
} catch (const fmt::SystemError &e) {
error = e;
}
fmt::Writer message;
format(message, error_code, "test");
EXPECT_EQ(message.str(), error.what());
EXPECT_EQ(error_code, error.error_code());
}
template <typename Error>
void CheckThrowError(int error_code, FormatErrorMessage format) {
fmt::SystemError error(0, "");
......@@ -209,11 +192,6 @@ TEST(UtilTest, FormatSystemErrorMessage) {
GetSystemErrorMessage(EDOM)), message.str());
}
TEST(UtilTest, SystemErrorSink) {
CheckErrorSink<fmt::SystemErrorSink>(
EDOM, fmt::internal::FormatSystemErrorMessage);
}
TEST(UtilTest, ThrowSystemError) {
CheckThrowError<fmt::SystemError>(EDOM, fmt::internal::FormatSystemErrorMessage);
}
......@@ -242,11 +220,6 @@ TEST(UtilTest, FormatWinErrorMessage) {
actual_message.str());
}
TEST(UtilTest, WinErrorSink) {
CheckErrorSink<fmt::WinErrorSink>(
ERROR_FILE_EXISTS, fmt::internal::FormatWinErrorMessage);
}
TEST(UtilTest, ThrowWinError) {
CheckThrowError<fmt::WindowsError>(
ERROR_FILE_EXISTS, fmt::internal::FormatWinErrorMessage);
......
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