From c55aa4f27d4fcb1d179fb1b17034476a5918ea85 Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Mon, 9 Apr 2018 16:50:19 +0900 Subject: test: Fix sign for expected values A number of BOOST_CHECK_EQUAL calls would result in warnings about signs. --- src/test/crypto_tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/crypto_tests.cpp') diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp index cdfc664d56..de0d72614b 100644 --- a/src/test/crypto_tests.cpp +++ b/src/test/crypto_tests.cpp @@ -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 -- cgit v1.2.3