Skip to content

Commit

Permalink
Make comparison simpler for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
mborland committed Oct 31, 2024
1 parent 34c0536 commit 4a23f4a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/test_shake128.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,15 @@ void test_continuous_output()
{
const auto status {hasher.get_digest(message_result)};
BOOST_TEST_EQ(status, message_result.size());
BOOST_TEST(!std::equal(message_result.begin(), message_result.end(),
message_result_previous.begin(), message_result.end()));
int same_counter = 0;
for (std::size_t j {}; j < message_result.size(); ++j)
{
if (message_result[j] == message_result_previous[j])
{
++same_counter;
}
}
BOOST_TEST_LE(same_counter, 64);
message_result_previous = message_result;
}

Expand Down

0 comments on commit 4a23f4a

Please sign in to comment.