Commit 434e83a1 authored by Victor Zverovich's avatar Victor Zverovich

Fix posix-test.

parent ddd95965
......@@ -34,6 +34,7 @@
#ifdef _WIN32
# include <io.h>
# undef max
# undef ERROR
#endif
#include "gtest-extra.h"
......@@ -257,10 +258,11 @@ TEST(FileTest, Size) {
f.close();
#ifdef _WIN32
fmt::Writer message;
format_windows_error(message, ERROR_ACCESS_DENIED, "cannot get file size");
fmt::format_windows_error(
message, ERROR_ACCESS_DENIED, "cannot get file size");
fstat_sim = ERROR;
EXPECT_THROW_MSG(f.size(), fmt::WindowsError, message.str());
fstat_sim = NONE
fstat_sim = NONE;
#else
EXPECT_SYSTEM_ERROR(f.size(), EBADF, "cannot get file attributes");
#endif
......
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