test(allocator): increase test coverage for Arena::allocated_bytes#21770
Merged
graphite-app[bot] merged 1 commit intomainfrom Apr 26, 2026
Conversation
This was referenced Apr 26, 2026
Member
Author
This was referenced Apr 26, 2026
Merged
Merging this PR will not alter performance
Comparing Footnotes
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR increases allocator test coverage by expanding assertions around Arena::allocated_bytes() as the arena grows and resets, ensuring the reported totals match expected chunk sizing behavior.
Changes:
- Extend
allocated_bytesunit test to cover empty arena, single-chunk reset behavior, and in-chunk allocations. - Add coverage for multi-chunk growth (2nd/3rd chunk creation) and verify
reset()deallocates older chunks while retaining the most recent chunk. - Add a helper to count allocated chunks via
iter_allocated_chunks()and assert chunk counts alongside byte totals.
d1aea95 to
b0920c8
Compare
This was referenced Apr 26, 2026
Contributor
Merge activity
|
…21770) Add more test coverage for `Arena::allocated_bytes`.
ab5c180 to
82aad73
Compare
b0920c8 to
5199c89
Compare
Base automatically changed from
om/04-25-test_allocator_reformat_comments
to
main
April 26, 2026 22:00
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Add more test coverage for
Arena::allocated_bytes.