]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/geometry/test/robustness/overlay/buffer/recursive_polygons_buffer.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / geometry / test / robustness / overlay / buffer / recursive_polygons_buffer.cpp
index 8816e2b5991acff06c63473b481c676511ac11d3..6a6d431a9b8b1cf4a30c8aa7f82a3eee092ed2b7 100644 (file)
@@ -87,8 +87,8 @@ bool verify(std::string const& caseid, MultiPolygon const& mp, MultiPolygon cons
     bool result = true;
 
     // Area of buffer must be larger than of original polygon
-    BOOST_AUTO(area_mp, bg::area(mp));
-    BOOST_AUTO(area_buf, bg::area(buffer));
+    double area_mp = bg::area(mp);
+    double area_buf = bg::area(buffer);
 
     if (area_buf < area_mp)
     {
@@ -109,6 +109,16 @@ bool verify(std::string const& caseid, MultiPolygon const& mp, MultiPolygon cons
         }
     }
 
+    if (result)
+    {
+        std::string message;
+        if (! bg::is_valid(buffer, message))
+        {
+            std::cout << "Buffer is not valid: " << message << std::endl;
+            result = false;
+        }
+    }
+
     bool svg = settings.svg;
     bool wkt = settings.wkt;
     if (! result)
@@ -204,7 +214,7 @@ bool test_buffer(MultiPolygon& result, int& index,
     bg::strategy::buffer::end_round end_strategy;
     bg::strategy::buffer::point_circle point_strategy;
     bg::strategy::buffer::side_straight side_strategy;
-    bg::strategy::buffer::join_round join_round_strategy(100); // Compatible with unit tests
+    bg::strategy::buffer::join_round join_round_strategy(32); // Compatible with MySQL
     bg::strategy::buffer::join_miter join_miter_strategy;
 
     try