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

Test set operations on random grids with integer coordinates #1361

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

tinko92
Copy link
Collaborator

@tinko92 tinko92 commented Jan 6, 2025

As discussed in #1356 , this adds an overlay test from https://gist.github.com/tinko92/fad450e1058ce8ceebde66a6b86d45c1 that generates grids based on bit patterns and verifies the correctness of set operation by testing against the corresponding logical operation on the bit sets.

The test is cleaned up and generalized to take width and height options from the command line. It is not intended to be run by default as part of the test suite (I understand, this is not the case for the robustness tests in general?) because it is only useful with a large iteration count and thereby long-running. It is also meant to be built with optimizations to mitigate the high time cost and prints failures to stdout in WKT with the corresponding bitset rather than triggering assertions.

The design idea was to build a test that, in principle, could test every possible code path in overlay (for sufficiently large width and height). I lack the insight in the overlay details to judge whether it meets that goal. It is also meant to test only for non-numerical issues, so it intentionally only supports integer coordinates. The limitation to a rectangular grid is just for simplicity of implementation, but in principle every indexable, disjoint set of rings with corresponding test points should work.

@barendgehrels
Copy link
Collaborator

Cool! I'll review it Wednesday

@tinko92 tinko92 force-pushed the test/random-integer-grid branch from b838f8e to afd9460 Compare January 7, 2025 02:07
@tinko92 tinko92 force-pushed the test/random-integer-grid branch from afd9460 to ce38ac2 Compare January 8, 2025 13:22
@barendgehrels
Copy link
Collaborator

It is not intended to be run by default as part of the test suite (I understand, this is not the case for the robustness tests in general?) because it is only useful with a large iteration count and thereby long-running.

This is completely fine, indeed the robustness tests are to be executed manually. I do it regularly (not all of them, but some).

I'll continue tonight or tomorrow - I had some remarks but basically it looks good, I'm glad with the addition.

@tinko92 tinko92 force-pushed the test/random-integer-grid branch 2 times, most recently from 4131e98 to 27dfc3a Compare January 9, 2025 12:43
@tinko92
Copy link
Collaborator Author

tinko92 commented Jan 9, 2025

The second commit was intentionally not squished to delineate the new changes from the already reviewed ones but I can rebase and force push if a single commit PR is prefered.

@barendgehrels
Copy link
Collaborator

The second commit was intentionally not squished to delineate the new changes from the already reviewed ones but I can rebase and force push if a single commit PR is prefered.

I usually look at compare so for me it's fine to squash it. But this is also fine.

@tinko92 tinko92 force-pushed the test/random-integer-grid branch from 27dfc3a to c4ac51c Compare January 10, 2025 11:48
Copy link
Member

@vissarion vissarion left a comment

Choose a reason for hiding this comment

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

Thanks Tinko, LGTM.

@tinko92 tinko92 force-pushed the test/random-integer-grid branch from c4ac51c to 2537c6b Compare January 10, 2025 12:55
@tinko92
Copy link
Collaborator Author

tinko92 commented Jan 10, 2025

Thanks for the comments, @vissarion (I think some of the early ones maybe overlapped with my previous push) and @barendgehrels !

(Sorry about that 50c20ad push. I wasn't aware of that cmake test running on my private fork, or I would have run it locally to catch that before pushing).

@tinko92 tinko92 force-pushed the test/random-integer-grid branch from 2537c6b to 50c20ad Compare January 10, 2025 14:41
Copy link
Collaborator

@barendgehrels barendgehrels left a comment

Choose a reason for hiding this comment

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

👍

@barendgehrels
Copy link
Collaborator

Can we merge this?

@tinko92
Copy link
Collaborator Author

tinko92 commented Jan 16, 2025

Can we merge this?

I checked all conversations and resolved every point as addressed. Should I merge it or is that for someone with a boostorg member role to do?

@vissarion vissarion merged commit 3fc2739 into boostorg:develop Jan 17, 2025
23 checks passed
@tinko92 tinko92 deleted the test/random-integer-grid branch January 17, 2025 14:26
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.

3 participants