test: Fix sign for expected values

A number of BOOST_CHECK_EQUAL calls would result in warnings about signs.
This commit is contained in:
Karl-Johan Alm
2018-04-09 16:50:19 +09:00
parent 27278dffe8
commit c55aa4f27d
20 changed files with 144 additions and 144 deletions

View File

@@ -527,10 +527,10 @@ BOOST_AUTO_TEST_CASE(chacha20_testvector)
BOOST_AUTO_TEST_CASE(countbits_tests)
{
FastRandomContext ctx;
for (int i = 0; i <= 64; ++i) {
for (unsigned int i = 0; i <= 64; ++i) {
if (i == 0) {
// Check handling of zero.
BOOST_CHECK_EQUAL(CountBits(0), 0);
BOOST_CHECK_EQUAL(CountBits(0), 0U);
} else if (i < 10) {
for (uint64_t j = 1 << (i - 1); (j >> i) == 0; ++j) {
// Exhaustively test up to 10 bits