Add tests.

This commit is contained in:
Victor Zverovich
2014-05-15 07:45:44 -07:00
parent e1ba41f0ce
commit d758dbb33a
5 changed files with 134 additions and 5 deletions
+6 -2
View File
@@ -348,6 +348,12 @@ TEST(StreamingAssertionsTest, EXPECT_WRITE) {
<< "expected failure", "expected failure");
}
TEST(UtilTest, FormatSystemErrorMessage) {
fmt::Writer out;
fmt::internal::FormatSystemErrorMessage(out, EDOM, "test message");
EXPECT_EQ(out.str(), FormatSystemErrorMessage(EDOM, "test message"));
}
#if FMT_USE_FILE_DESCRIPTORS
// Checks if the file is open by reading one character from it.
@@ -800,8 +806,6 @@ TEST(OutputRedirectTest, ErrorInDtor) {
write_copy.dup2(write_fd); // "undo" close or dtor of BufferedFile will fail
}
// TODO: test retry on EINTR, test FormatSystemErrorMessage
#endif // FMT_USE_FILE_DESCRIPTORS
} // namespace