This commit is contained in:
Scott E. Graves 2024-10-09 14:08:38 -05:00
parent b35e100bb2
commit d09d55951d

View File

@ -1324,17 +1324,17 @@ TEST(file_manager,
#if defined(_WIN32) #if defined(_WIN32)
EXPECT_EQ(api_error::success, fm.open(non_writeable, {}, handle, f)); EXPECT_EQ(api_error::success, fm.open(non_writeable, {}, handle, f));
EXPECT_CALL(*non_writeable, get_open_data()) EXPECT_CALL(*non_writeable, get_open_data())
.WillOnce([&handle]() -> std::map<std::uint64_t, open_file_data>& { .WillOnce([&handle]() -> std::map<std::uint64_t, open_file_data> & {
static std::map<std::uint64_t, open_file_data> map; static std::map<std::uint64_t, open_file_data> map;
map[handle]={}; map[handle] = {};
return map; return map;
}); });
#else #else
EXPECT_EQ(api_error::success, fm.open(non_writeable, O_RDWR, handle, f)); EXPECT_EQ(api_error::success, fm.open(non_writeable, O_RDWR, handle, f));
EXPECT_CALL(*non_writeable, get_open_data()) EXPECT_CALL(*non_writeable, get_open_data())
.WillOnce([&handle]() -> std::map<std::uint64_t, open_file_data>& { .WillOnce([&handle]() -> std::map<std::uint64_t, open_file_data> & {
static std::map<std::uint64_t, open_file_data> map; static std::map<std::uint64_t, open_file_data> map;
map[handle]=O_RDWR; map[handle] = O_RDWR;
return map; return map;
}); });
#endif #endif