Fix windows build

This commit is contained in:
Victor Zverovich 2017-03-04 07:10:54 -08:00
parent 572491ad1f
commit 3610f34c70
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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);
}