Skip to content

test: random_matching_test.cpp modernized, made self-contained and assertive - #555

Open
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:fix/random-matching-test-exit-code
Open

test: random_matching_test.cpp modernized, made self-contained and assertive#555
Becheler wants to merge 1 commit into
boostorg:developfrom
Becheler:fix/random-matching-test-exit-code

Conversation

@Becheler

Copy link
Copy Markdown
Collaborator

Code coverage is very unstable, I am fixing unit tests, and many are not asserting much and only printing to cout, which is never checked: failed test still show as PASS.

Before submitting

  • This PR targets the develop branch.
  • I searched for an existing PR or issue covering the same change.
  • My contribution is licensed under the Boost Software License 1.0.

Type of change

  • Bug fix
  • New feature or API addition
  • Refactor (no behavior change)
  • Documentation
  • Build, CI, or tooling
  • Other (specify below)

Does this PR introduce a breaking change?

  • Yes (describe migration impact below)
  • No

What this PR does

  • test now fails the build, not just stdout
  • self-contained: hardcoded n/m as constexpr, dropped argc/argv + usage message; removed args from Jamfile.
  • standard RNG: just use bare std::mt19937.
  • Modernized typedefs
  • Trimmed comments to single-line

Motivation

Our coverage is not great, code coverage flickers in CI

Testing

Checklist

  • Existing tests pass (b2 in the test/ directory).
  • New behavior is covered by a test, or this is a docs / build / refactor change.
  • Documentation was updated if user-facing behavior changed.
  • No new compiler warnings on the platforms I built against.

@Becheler Becheler self-assigned this Aug 10, 2026
@Becheler Becheler added the technical debt Code that works but needs refactoring, cleanup, or modernization. Not user-facing. label Aug 10, 2026
@Becheler Becheler changed the title fix: modernize the test, make-it self-contained and assertive test: modernize the test, make-it self-contained and assertive Aug 10, 2026
@github-actions

Copy link
Copy Markdown

Boost dependency footprint vs develop (auto-generated).
PR run 31389595260 vs develop run 31385980713 (ca9a25ebe7).

Header-inclusion weights (graph files pulling each direct dependency in):

No header-inclusion-weight changes.

Transitive Boost modules: 68 → 68 (0)

@Becheler Becheler changed the title test: modernize the test, make-it self-contained and assertive test: random_matching_test.cpp modernized, made self-contained and assertive Aug 10, 2026
@Becheler Becheler added the test Adding, fixing or modernizing unit tests label Aug 10, 2026
@github-actions

Copy link
Copy Markdown

Compiler-warning counts vs develop (auto-generated).
PR run 31389595234 vs develop run 31385980794 (ca9a25ebe7).

Job Baseline After Delta
macos (clang, 14) 681 680 -1
macos (clang, 17) 641 641 0
macos (clang, 20) 641 641 0
ubuntu (clang-19, 14) 681 680 -1
ubuntu (clang-19, 17) 641 641 0
ubuntu (clang-19, 20) 641 641 0
ubuntu (clang-19, 23) 641 641 0
ubuntu (gcc-14, 14) 827 827 0
ubuntu (gcc-14, 17) 949 949 0
ubuntu (gcc-14, 20) 949 949 0
ubuntu (gcc-14, 23) 949 949 0
windows_msvc_14_3 (msvc-14.3) 962 962 0

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.82%. Comparing base (bc05361) to head (ca9a25e).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
test/random_matching_test.cpp 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #555      +/-   ##
===========================================
+ Coverage    88.22%   92.82%   +4.60%     
===========================================
  Files          392      392              
  Lines        27412    28166     +754     
  Branches      7997     7994       -3     
===========================================
+ Hits         24183    26146    +1963     
- Misses        1881     1914      +33     
+ Partials      1348      106    -1242     
Files with missing lines Coverage Δ
test/random_matching_test.cpp 69.38% <92.30%> (+19.38%) ⬆️

... and 288 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e818d4...ca9a25e. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

technical debt Code that works but needs refactoring, cleanup, or modernization. Not user-facing. test Adding, fixing or modernizing unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant