From d9350e6ddb460e9f140ae9100d99e9b31eb85720 Mon Sep 17 00:00:00 2001 From: nicola_gastaldon Date: Fri, 20 Nov 2026 12:27:19 +0100 Subject: [PATCH] test: add an instance fixed by these changes to the test suite --- test/algorithms/overlay/overlay_cases.hpp | 8 ++++++++ test/algorithms/set_operations/set_ops_areal_areal.cpp | 1 + 2 files changed, 9 insertions(+) diff --git a/test/algorithms/overlay/overlay_cases.hpp b/test/algorithms/overlay/overlay_cases.hpp index 93b3bc1313..3a2b14d4de 100644 --- a/test/algorithms/overlay/overlay_cases.hpp +++ b/test/algorithms/overlay/overlay_cases.hpp @@ -1671,4 +1671,12 @@ static std::string issue_1487[2] = "5110.0842867836363 -2645.5659190779725))" }; +// A hole of the first polygon is inside the second polygon and touches it at one vertex. +// The difference kept the hole, nested in the second polygon, and was invalid. +static std::string case_hole_touching_at_vertex[2] = +{ + "POLYGON((0 0,0 100,100 100,100 0,0 0),(10 10,30 20,20 30,10 10))", + "POLYGON((10 10,15 50,50 50,50 15,10 10))" +}; + #endif // BOOST_GEOMETRY_TEST_OVERLAY_CASES_HPP diff --git a/test/algorithms/set_operations/set_ops_areal_areal.cpp b/test/algorithms/set_operations/set_ops_areal_areal.cpp index 38cc165af4..2a69490188 100644 --- a/test/algorithms/set_operations/set_ops_areal_areal.cpp +++ b/test/algorithms/set_operations/set_ops_areal_areal.cpp @@ -332,6 +332,7 @@ int test_main(int, char* []) TEST_CASE(issue_1471); TEST_CASE(issue_1487); + TEST_CASE(case_hole_touching_at_vertex); return 0; }