test: Kill BOOST_ASSERT and update the linter#27889
Merged
fanquake merged 2 commits intobitcoin:masterfrom Jun 22, 2023
Merged
Conversation
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
maflcko
reviewed
Jun 14, 2023
Member
Author
|
Updated 82f694a -> de5e464 (pr27889.01 -> pr27889.02, diff):
|
maflcko
reviewed
Jun 14, 2023
The `BOOST_ASSERT` macro requires to `#include boost/assert.hpp`.
Member
Author
|
Updated de5e464 -> 28fff06 (pr27889.02 -> pr27889.03, diff):
|
Contributor
stickies-v
approved these changes
Jun 16, 2023
Contributor
stickies-v
left a comment
There was a problem hiding this comment.
ACK 28fff06
No need for BOOST_ASSERT. Verified that the test works:
./test/lint/all-lint.py
BOOST_ASSERT must be replaced with Assert, BOOST_REQUIRE, or BOOST_CHECK.
src/wallet/test/db_tests.cpp: BOOST_ASSERT(status == DatabaseCursor::Status::MORE);
^---- failure generated from lint-assertions.py
sedited
approved these changes
Jun 22, 2023
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Jun 22, 2023
28fff06 test: Make linter to look for `BOOST_ASSERT` macros (Hennadii Stepanov) 47fe551 test: Kill `BOOST_ASSERT` (Hennadii Stepanov) Pull request description: One of the goals of bitcoin#27783 was to get rid of the `BOOST_ASSERT` macros instead of including the `boost/assert.hpp` headers. See bitcoin#27783 (comment). It turns out that a couple of those macros sneaked into the codebase in bitcoin#27790. This PR makes the linter guard against new instances of the `BOOST_ASSERT` macros and replaces the current ones. ACKs for top commit: kevkevinpal: ACK [28fff06](bitcoin@28fff06) stickies-v: ACK 28fff06 TheCharlatan: ACK 28fff06 Tree-SHA512: 371f613592cf677afe0196d18c83943c6c8f1e998f57b4ff3ee58bfeff8636e4dac1357840d8611b4f7b197def94df10fe1a8ca3282b00b7b4eff4624552dda8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One of the goals of #27783 was to get rid of the
BOOST_ASSERTmacros instead of including theboost/assert.hppheaders. See #27783 (comment).It turns out that a couple of those macros sneaked into the codebase in #27790.
This PR makes the linter guard against new instances of the
BOOST_ASSERTmacros and replaces the current ones.