aboutsummaryrefslogtreecommitdiff
path: root/src/test/crypto_tests.cpp
diff options
context:
space:
mode:
authorKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-04-09 16:50:19 +0900
committerKarl-Johan Alm <karljohan-alm@garage.co.jp>2018-04-11 13:39:41 +0900
commitc55aa4f27d4fcb1d179fb1b17034476a5918ea85 (patch)
tree3ff1096edd9b06cab9dc1a172900b5672d670430 /src/test/crypto_tests.cpp
parent27278dffe877ab95488f2e0fada53edb9590487f (diff)
downloadbitcoin-c55aa4f27d4fcb1d179fb1b17034476a5918ea85.tar.xz
test: Fix sign for expected values
A number of BOOST_CHECK_EQUAL calls would result in warnings about signs.
Diffstat (limited to 'src/test/crypto_tests.cpp')
-rw-r--r--src/test/crypto_tests.cpp4
1 files changed, 2 insertions, 2 deletions
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