Skip to content

Fix stream ops for RNG instances - #156

Merged
mborland merged 2 commits into
boostorg:developfrom
Flamefire:stream-op
Sep 14, 2026
Merged

Fix stream ops for RNG instances#156
mborland merged 2 commits into
boostorg:developfrom
Flamefire:stream-op

Conversation

@Flamefire

@Flamefire Flamefire commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Users might want to test if reading or writing the RNG state worked
The only way is checking the stream state.

So add assertions for that and fix the offending ones

@Flamefire
Flamefire force-pushed the stream-op branch 2 times, most recently from f2d641b to a1d303f Compare September 12, 2026 17:51
@Flamefire Flamefire changed the title Add test for stream state when saving/restoring RNG state Fix stream ops for RNG instances Sep 12, 2026
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.79%. Comparing base (f1983c8) to head (74d6d20).

Files with missing lines Patch % Lines
include/boost/random/mixmax.hpp 90.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #156      +/-   ##
===========================================
- Coverage    95.79%   95.79%   -0.01%     
===========================================
  Files          117      117              
  Lines         7660     7652       -8     
===========================================
- Hits          7338     7330       -8     
  Misses         322      322              
Files with missing lines Coverage Δ
include/boost/random/lagged_fibonacci.hpp 98.96% <100.00%> (ø)
include/boost/random/mersenne_twister.hpp 99.43% <100.00%> (-0.01%) ⬇️
include/boost/random/splitmix64.hpp 100.00% <100.00%> (ø)
test/test_generator.ipp 100.00% <100.00%> (ø)
include/boost/random/mixmax.hpp 99.04% <90.00%> (-0.02%) ⬇️

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 f1983c8...74d6d20. Read the comment docs.

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

@mborland mborland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but currently has a merge conflict.

Make sure that a write and read leave the stream in a non-error and EOF state.
@Flamefire

Copy link
Copy Markdown
Contributor Author

Rebased. CI passes again

@mborland
mborland merged commit 8ee0e54 into boostorg:develop Sep 14, 2026
63 checks passed
@Flamefire
Flamefire deleted the stream-op branch September 14, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants