Skip to content

scripted-diff: [test] Add util/check.h includes for assertions - #36843

Closed
maflcko wants to merge 0 commit into
bitcoin:masterfrom
maflcko:2608-test-assert
Closed

maflcko wants to merge 0 commit into
bitcoin:masterfrom
maflcko:2608-test-assert

Conversation

@maflcko

@maflcko maflcko commented Nov 12, 2026

Copy link
Copy Markdown
Member

In test code, assert is used. This is perfectly fine, but sometimes confusion arises, when it is unclear whether NDEBUG can disable the assertions, or whether to use assert or Assert.

Avoid that confusion in test code with a scripted replacement to add the util/check.h include. The changes here will also make it easier to run IWYU.

Scope: This change is only about test code, other code can be done later, if there is need to.

(Currently a draft, because it waits on other stuff)

@DrahtBot DrahtBot changed the title scripted-diff: [test] Add util/check.h includes for assertions scripted-diff: [test] Add util/check.h includes for assertions Nov 12, 2026
@maflcko
maflcko marked this pull request as draft November 12, 2026 09:44
@DrahtBot

DrahtBot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #bitcoin-core/gui/945 (Fix sign message address book filtering by Bushstar)
  • #36844 (iwyu: Fix warnings in some modules in src/ and treat them as errors by hebasto)
  • #36832 (test: speed up wallet unit test by ViniciusCestarii)
  • #36808 (iwyu: Fix warnings in src/test/fuzz and treat them as errors by hebasto)
  • #36737 (qa: check more socket API invariants for each platform we support by darosior)
  • #36598 ([Demo] validation: remove AssumeUTXO by l0rinc)
  • #36548 (net: serve MSG_BLOCK by stripping witnesses in place by l0rinc)
  • #36520 (interfaces: Avoid node crashes from invalid Chain IPC calls by ryanofsky)
  • #36506 (p2p: plug "tier 1" 1p1c liveness holes by instagibbs)
  • #36386 (compressor: oversized script decoding can leave a spendable script by l0rinc)
  • #36280 (validation: throw when a compressed script can't be decompressed by furszy)
  • #36167 (build: Enable -Wunused by fanquake)
  • #36040 (Wallet: Don't backdate locktime rbf by Bicaru20)
  • #36000 (validation: prefetch blocks while connecting by l0rinc)
  • #35731 (Indexes: Harden the flush-error notification invariant by arejula27)
  • #35713 (Remove boost as a unit test runner by rustaceanrob)
  • #35302 (Silent Payments: Sending (take 2) by Eunovo)
  • #35003 (validation: improve block data I/O error handling in P2P paths by furszy)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot

Copy link
Copy Markdown
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants