test: Remove `BOOST_CHECK_CLOSE` in favor of exact comparison #36067

pull rustaceanrob wants to merge 1 commits into bitcoin:master from rustaceanrob:26-8-24-close-check changing 1 files +4 −4
  1. rustaceanrob commented at 1:29 PM on August 24, 2026: member

    max_cache is known ahead of time in this test as a size_t of 10000, and each of these calculations should be known ahead of time (500.0, 9500.0). This test can truncate the double and assert exact equality rather than use a tolerance. Found in #35713 whereby this is the only use of this macro in the unit tests. IMO it is appropriate to tighten this test and remove the macro.

  2. test: Remove `BOOST_CHECK_CLOSE` in favor of exact comparison
    `max_cache` is known ahead of time in this test as a `size_t` of
    `10000`, and each of these calculations should be known ahead of time
    (500.0, 9500.0). This test can truncate the double and assert exact
    equality rather than use a tolerance.
    9e115edd39
  3. DrahtBot added the label Tests on Aug 24, 2026
  4. DrahtBot commented at 1:29 PM on August 24, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36067.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK maflcko, josibake

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. maflcko commented at 1:55 PM on August 24, 2026: member

    lgtm ACK 9e115edd39ffffa81b0b2a7eafada44ecf01c057

  6. fanquake merged this on Aug 24, 2026
  7. fanquake closed this on Aug 24, 2026

  8. l0rinc commented at 3:39 AM on August 25, 2026: contributor

    Post-merge ACK

    The exact integer comparison matches the size_t conversion in MaybeRebalanceCaches().

    Not sure how useful these tests are, or the custom sizing in general (since I have a pending PR completely removing them, but the benchmarks are a bit all over the place, so I postponed pushing it), but the PR simplifies what we had.

  9. rustaceanrob deleted the branch on Aug 25, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-31 17:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me