Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor image vault utils #3846

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_image_vault_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ TEST_F(TestImageVaultUtils, copy_to_dir_copys_to_dir)
TEST_F(TestImageVaultUtils, compute_hash_throws_when_cant_read)
{
QBuffer buffer{}; // note: buffer is not opened
MP_EXPECT_THROW_THAT(MP_IMAGE_VAULT_UTILS.compute_hash(buffer),
MP_EXPECT_THROW_THAT(auto _ = MP_IMAGE_VAULT_UTILS.compute_hash(buffer),
ricab marked this conversation as resolved.
Show resolved Hide resolved
std::runtime_error,
mpt::match_what(HasSubstr("Failed to read")));
}
Expand All @@ -106,7 +106,7 @@ TEST_F(TestImageVaultUtils, compute_file_hash_throws_when_cant_open)
})))
.WillOnce(Return(false));

MP_EXPECT_THROW_THAT(MP_IMAGE_VAULT_UTILS.compute_file_hash(test_path),
MP_EXPECT_THROW_THAT(auto _ = MP_IMAGE_VAULT_UTILS.compute_file_hash(test_path),
std::runtime_error,
mpt::match_what(AllOf(HasSubstr(test_path.toStdString()), HasSubstr("Failed to open"))));
}
Expand Down
Loading