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:
1 parent
de6c7a6038
commit
724104b6a7
1 file changed
+3
-2
@@ -105,9 +105,10 @@ TEST(GraphicalObjectsTest, ArcGIS_Integration_Points)
|
|||||||
// Test polygon preparation for ArcGIS
|
// Test polygon preparation for ArcGIS
|
||||||
QPolygonF boundary;
|
QPolygonF boundary;
|
||||||
boundary << QPointF(-122.5, 45.4) << QPointF(-122.1, 45.4)
|
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());
|
EXPECT_TRUE(boundary.isClosed());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user