From db3a1685dbf23436b61902876a55cc670ef89a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bartoletti?= Date: Wed, 5 Jun 2024 13:41:01 +0200 Subject: [PATCH] [CI] Fix MSYS build On Windows, visibility algorithm WKT is not the same as on unix/linux. POLYGON((... 2.3 1.5 ...)) vs POLYGON((... 2.2 1.5 ...)) This is due to rounding. Using the SFCGAL WKT fix the CI. --- test/unit/SFCGAL/algorithm/Visibility.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/unit/SFCGAL/algorithm/Visibility.cpp b/test/unit/SFCGAL/algorithm/Visibility.cpp index ca784aa8..d7e76ae0 100644 --- a/test/unit/SFCGAL/algorithm/Visibility.cpp +++ b/test/unit/SFCGAL/algorithm/Visibility.cpp @@ -160,9 +160,15 @@ BOOST_AUTO_TEST_CASE(testVisibility_PointOnPolygonHole) Point queryPoint(0.0, 2.0); std::unique_ptr result(algorithm::visibility(poly, queryPoint)); - std::string expectedWkt = "POLYGON((1.0 2.0,0.0 4.0,0.0 0.0,1.0 0.7,0.2 " - "1.8,0.9 1.8,2.2 1.5,3.0 2.0,1.0 2.0))"; - BOOST_CHECK_EQUAL(result->asText(1), expectedWkt); + // std::string expectedWkt = "POLYGON((1.0 2.0,0.0 4.0,0.0 0.0,1.0 0.7,0.2 " + // "1.8,0.9 1.8,2.2 1.5,3.0 2.0,1.0 2.0))"; + std::string expectedWkt = + "POLYGON((1/1 2/1,0/1 4/1,0/1 0/1,10808639105689191/10358279142952141 " + "7205759403792794/10358279142952141,3602879701896397/18014398509481984 " + "7/4,8106479329266893/9007199254740992 " + "8106479329266893/4503599627370496,24319437987800679/10808639105689190 " + "8106479329266893/5404319552844595,3/1 2/1,1/1 2/1))"; + BOOST_CHECK_EQUAL(result->asText(), expectedWkt); } BOOST_AUTO_TEST_CASE(testVisibility_PointVertexOnPolygonHole)