aboutsummaryrefslogtreecommitdiff
path: root/src/test/random_tests.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-05-11 11:33:42 +0800
committerfanquake <fanquake@gmail.com>2020-05-11 12:20:25 +0800
commitec4d27fa8bdc60315c21e71ab989905bf915225d (patch)
treee499861d10f9715d6104ff90d7d809329eeb4e55 /src/test/random_tests.cpp
parent88d8b4e182bfc75e8496f7046af7aab93307b9d0 (diff)
parent68537275bd91d1dc14a69609ae443f955bfdbd64 (diff)
downloadbitcoin-ec4d27fa8bdc60315c21e71ab989905bf915225d.tar.xz
Merge #18216: test, build: Enable -Werror=sign-compare
68537275bd91d1dc14a69609ae443f955bfdbd64 build: Enable -Werror=sign-compare (Ben Woosley) eac6a3080d38cfd4eb7204ecd327df213958e51a refactor: Rework asmap Interpret to avoid ptrdiff_t (Ben Woosley) df37377e30678ac9b8338ea920e50b7296da6bd5 test: Fix outstanding -Wsign-compare errors (Ben Woosley) Pull request description: Disallowing sign-comparison mismatches can help to prevent the introduction of overflow and interpretation bugs. In this case, ~all~ most existing violations are in the tests, and most simply required annotating the literal as unsigned for comparison. This was previously prevented by violations in leveldb which were fixed upstream and merged in #17398. You can test that by building this branch against: 22d11187ee3c7abfe9d43c9eb68f102498cc2b9a vs 75fb37ce68289eb7e00e2ccdd2ef7f9271332545 ACKs for top commit: fjahr: re-ACK 68537275bd91d1dc14a69609ae443f955bfdbd64 practicalswift: ACK 68537275bd91d1dc14a69609ae443f955bfdbd64 Tree-SHA512: 14b5daa38c496fb51548feb30fb4dd179e6f76a8d355f52bc8e2a18f2f9340f0bc98dcf36d8b3d6521045d013891c3103749a4eda88ceef00202a6a0cf93f73c
Diffstat (limited to 'src/test/random_tests.cpp')
-rw-r--r--src/test/random_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/random_tests.cpp b/src/test/random_tests.cpp
index ca3b92f2e1..d1f60e8972 100644
--- a/src/test/random_tests.cpp
+++ b/src/test/random_tests.cpp
@@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE(shuffle_stat_test)
}
BOOST_CHECK(chi_score > 58.1411); // 99.9999% confidence interval
BOOST_CHECK(chi_score < 210.275);
- BOOST_CHECK_EQUAL(sum, 12000);
+ BOOST_CHECK_EQUAL(sum, 12000U);
}
BOOST_AUTO_TEST_SUITE_END()