Improve compatibility with old compilers and fix test

This commit is contained in:
Victor Zverovich
2017-01-22 12:16:16 -08:00
parent aea5d3ab00
commit aaa0fc396b
2 changed files with 5 additions and 3 deletions

View File

@@ -781,7 +781,7 @@ TEST(UtilTest, WindowsError) {
TEST(UtilTest, ReportWindowsError) {
fmt::MemoryWriter out;
fmt::internal::format_windows_error(out, ERROR_FILE_EXISTS, "test error");
out << '\n';
out.write('\n');
EXPECT_WRITE(stderr,
fmt::report_windows_error(ERROR_FILE_EXISTS, "test error"), out.str());
}