mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 06:21:00 +00:00
Fix posix-test.
This commit is contained in:
parent
ddd95965e1
commit
434e83a192
@ -34,6 +34,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# undef max
|
# undef max
|
||||||
|
# undef ERROR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gtest-extra.h"
|
#include "gtest-extra.h"
|
||||||
@ -257,10 +258,11 @@ TEST(FileTest, Size) {
|
|||||||
f.close();
|
f.close();
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
fmt::Writer message;
|
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;
|
fstat_sim = ERROR;
|
||||||
EXPECT_THROW_MSG(f.size(), fmt::WindowsError, message.str());
|
EXPECT_THROW_MSG(f.size(), fmt::WindowsError, message.str());
|
||||||
fstat_sim = NONE
|
fstat_sim = NONE;
|
||||||
#else
|
#else
|
||||||
EXPECT_SYSTEM_ERROR(f.size(), EBADF, "cannot get file attributes");
|
EXPECT_SYSTEM_ERROR(f.size(), EBADF, "cannot get file attributes");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user