Skip to content

Commit

Permalink
Replace auto _ with std::ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Sploder12 committed Dec 17, 2024
1 parent eaf1f9e commit f128abb
Showing 1 changed file with 2 additions and 2 deletions.
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(auto _ = MP_IMAGE_VAULT_UTILS.compute_hash(buffer),
MP_EXPECT_THROW_THAT(std::ignore = MP_IMAGE_VAULT_UTILS.compute_hash(buffer),
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(auto _ = MP_IMAGE_VAULT_UTILS.compute_file_hash(test_path),
MP_EXPECT_THROW_THAT(std::ignore = 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

0 comments on commit f128abb

Please sign in to comment.