Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to do internal validations of the bitmap, intended for testing #493

Merged
merged 5 commits into from
Jul 4, 2023
Merged

Add a function to do internal validations of the bitmap, intended for testing #493

merged 5 commits into from
Jul 4, 2023

Conversation

Dr-Emann
Copy link
Member

Adds the function roaring_bitmap_internal_validate which validates assumptions that other code relies on (e.g. arrays are sorted and non-duplicated).

This may be useful for e.g. validating the result of deserializing, but mostly, it allows for an easy check to sprinkle through the unit tests to ensure the bitmap is always in a consistent state.

Dr-Emann added 5 commits June 19, 2023 12:11
Verfies that assumptions which should always be true continue to hold:
e.g. containers are in sorted order, array/run containers contain strictly
increasing numbers, bitsets precomputed cardinality is correct, etc.
@Dr-Emann Dr-Emann requested a review from lemire June 19, 2023 18:42
Copy link
Member

@lemire lemire left a comment

Choose a reason for hiding this comment

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

Very good.

@lemire lemire merged commit 31067e3 into RoaringBitmap:master Jul 4, 2023
@Dr-Emann Dr-Emann deleted the internal_validate branch July 4, 2023 19:17
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