mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-26 04:00:05 +00:00
Fix windows build
This commit is contained in:
parent
572491ad1f
commit
3610f34c70
@ -84,7 +84,7 @@
|
||||
std::string format_system_error(int error_code, fmt::string_view message);
|
||||
|
||||
#define EXPECT_SYSTEM_ERROR(statement, error_code, message) \
|
||||
EXPECT_THROW_MSG(statement, fmt::SystemError, \
|
||||
EXPECT_THROW_MSG(statement, fmt::system_error, \
|
||||
format_system_error(error_code, message))
|
||||
|
||||
#if FMT_USE_FILE_DESCRIPTORS
|
||||
|
@ -283,7 +283,7 @@ TEST(FileTest, Size) {
|
||||
fmt::internal::format_windows_error(
|
||||
message, ERROR_ACCESS_DENIED, "cannot get file size");
|
||||
fstat_sim = ERROR;
|
||||
EXPECT_THROW_MSG(f.size(), fmt::WindowsError, fmt::to_string(message));
|
||||
EXPECT_THROW_MSG(f.size(), fmt::windows_error, fmt::to_string(message));
|
||||
fstat_sim = NONE;
|
||||
#else
|
||||
f.close();
|
||||
@ -340,7 +340,7 @@ TEST(FileTest, ConvertReadCount) {
|
||||
++size;
|
||||
read_count = 1;
|
||||
read_nbyte = 0;
|
||||
EXPECT_THROW(read_end.read(&c, size), fmt::SystemError);
|
||||
EXPECT_THROW(read_end.read(&c, size), fmt::system_error);
|
||||
read_count = 0;
|
||||
EXPECT_EQ(UINT_MAX, read_nbyte);
|
||||
}
|
||||
@ -354,7 +354,7 @@ TEST(FileTest, ConvertWriteCount) {
|
||||
++size;
|
||||
write_count = 1;
|
||||
write_nbyte = 0;
|
||||
EXPECT_THROW(write_end.write(&c, size), fmt::SystemError);
|
||||
EXPECT_THROW(write_end.write(&c, size), fmt::system_error);
|
||||
write_count = 0;
|
||||
EXPECT_EQ(UINT_MAX, write_nbyte);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user