Fix GraphicalObjectsTest polygon closure assertion

- QPolygonF::isClosed() requires first and last points to be identical
- Added closing point to boundary polygon in test
- Test now correctly validates Qt6 polygon behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-10-20 03:50:41 +02:00
1 parent de6c7a6038
commit 724104b6a7
1 file changed
+3 -2
@@ -105,9 +105,10 @@ TEST(GraphicalObjectsTest, ArcGIS_Integration_Points)
// Test polygon preparation for ArcGIS
QPolygonF boundary;
boundary << QPointF(-122.5, 45.4) << QPointF(-122.1, 45.4)
<< QPointF(-122.1, 45.6) << QPointF(-122.5, 45.6);
<< QPointF(-122.1, 45.6) << QPointF(-122.5, 45.6)
<< QPointF(-122.5, 45.4); // Close polygon by repeating first point
EXPECT_EQ(boundary.size(), 4);
EXPECT_EQ(boundary.size(), 5);
EXPECT_TRUE(boundary.isClosed());
}