Add regression test for non-overlapping polygon intersection (issue #1439)#1441
Add regression test for non-overlapping polygon intersection (issue #1439)#1441kashish2710 wants to merge 1 commit intoboostorg:developfrom
Conversation
Adds a minimal test reproducing issue boostorg#1439 on Boost 1.89
|
The test is intentionally minimal to clearly reproduce the issue. |
|
|
||
| // Expected: no intersection | ||
| return output.empty() ? 0 : 1; | ||
| } |
There was a problem hiding this comment.
Thanks a lot. But yes, please adapt it to our current framework.
The cases themselves can go to:
https://github.com/boostorg/geometry/blob/develop/test/algorithms/overlay/overlay_cases.hpp#L1273
The test can go to:
https://github.com/boostorg/geometry/blob/develop/test/algorithms/set_operations/intersection/intersection.cpp#L297
These tests test on area, so the expected area should be 0.0
The test will then fail. So you can put the test between
#ifdef BOOST_GEOMETRY_TEST_ENABLE_FAILING
and
#endif
barendgehrels
left a comment
There was a problem hiding this comment.
As you mentioned, and I added in the comment,
better to have it in the framework.
|
Closing because the other one is merged. |
This PR adds a minimal regression test reproducing issue #1439.
The test shows that
boost::geometry::intersectioncurrently producesa non-empty result for two polygons that do not overlap.
The test fails on Boost 1.89 (tested on Linux / Google Colab),
confirming that the reported behavior is still present.
Once the underlying issue is fixed, this test will help ensure
that the behavior does not regress in future changes.
Still reproducible on Boost 1.89 (Linux).
See attached output showing non-empty intersection for non-overlapping polygons.