]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/geometry/test/algorithms/set_operations/intersection/intersection_linear_linear.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / geometry / test / algorithms / set_operations / intersection / intersection_linear_linear.cpp
index 5224f10f4ca19082c41f5f4c7ea06b01f7080b72..3c7476d0c41968a7fdc55a659fad0659d2e519dd 100644 (file)
@@ -18,6 +18,7 @@
 #define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
 #endif
 
+#include "geometry_test_common.hpp"
 #include <boost/test/included/unit_test.hpp>
 
 #include "test_intersection_linear_linear.hpp"
@@ -476,6 +477,28 @@ BOOST_AUTO_TEST_CASE( test_intersection_linestring_linestring )
          from_wkt<ML>("MULTILINESTRING((1 0,1 1))"),
          "lli25"
          );
+
+#if defined(BOOST_GEOMETRY_TEST_FAILURES)
+    {
+        // This test fails if side_by_triangle is used in intersection
+        ut_settings settings;
+        settings.tolerance = 1.0e-9;
+        settings.test_alternative_side_strategy = true;
+        settings.test_default_strategy = BG_IF_TEST_FAILURES;
+        settings.test_explicit_strategy = BG_IF_TEST_FAILURES;
+        settings.test_invariance = BG_IF_TEST_FAILURES;
+
+        tester::apply
+                (from_wkt<L>("LINESTRING(-2305843009213693956 4611686018427387906, -33 -92, 78 83)"),
+                 from_wkt<L>("LINESTRING(31 -97, -46 57, -20 -4)"),
+                 from_wkt<ML>("MULTILINESTRING((1.39042821159 -37.7808564232,1.39042821159 -37.7808564232))"),
+                 "lli26",
+                 settings
+                 );
+    }
+#endif
+
+
 }
 
 
@@ -1271,9 +1294,12 @@ BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_degenerate )
     tester::apply
         (from_wkt<ML>("MULTILINESTRING((1 5, -4.3 -.1), (0 6, 8.6 6, 189.7654 5, 1 3, 6 3, 3 5, 6 2.232432, 0 4), (-6 5, 1 2.232432), (3 -1032.34324, 9 0, 189.7654 1, -1.4 3, 3 189.7654, +.3 10.0002, 1 5, 6 3, 5 1, 9 1, 10.0002 -1032.34324, -0.7654 0, 5 3, 3 4), (2.232432 2.232432, 8.6 +.4, 0.0 2.232432, 4 0, -8.8 10.0002), (1 0, 6 6, 7 2, -0 8.4), (-0.7654 3, +.6 8, 4 -1032.34324, 1 6, 0 4), (0 7, 2 1, 8 -7, 7 -.7, -1032.34324 9), (5 0, 10.0002 4, 8 7, 3 3, -8.1 5))"),
          from_wkt<ML>("MULTILINESTRING((5 10.0002, 2 7, -0.7654 0, 5 3), (0 -0.7654, 4 10.0002, 4 +.1, -.8 3, -.1 8, 10.0002 2, +.9 -1032.34324))"),
-#ifdef BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
+
+    // NOTE: if get_turn_info uses policy_verify_all then the result is different
+
+  #if BOOST_GEOMETRY_INTERSECTION_DO_NOT_INCLUDE_ISOLATED_POINTS
          from_wkt<ML>("MULTILINESTRING((-0.7654 8.88178e-16,-0.7654 0,5 3))"),
-#else
+  #else
          from_wkt<ML>("MULTILINESTRING((-0.756651 3.30964),(1.60494 6),\
                       (2.51371 6),(3.26673 6),(4 6),(8.18862 3.07616),\
                       (4 3.03179),(1.40063 3.00424),(1.39905 3),\
@@ -1341,7 +1367,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_degenerate )
                       (7.08745 -329.0674155),(5.06428 -559.024344),\
                       (3.23365 -767.0972558),(3.16036 -775.427199),\
                       (-0.7654 8.88178e-16,-0.7654 0,5 3))"),
-#endif
+  #endif // isolated
           "mlmli21",
           1e-4
          );
@@ -1361,6 +1387,8 @@ BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_spikes )
     std::cout << std::endl;
 #endif
 
+    BoostGeometryWriteTestConfiguration();
+
     typedef multi_linestring_type ML;
 
     typedef test_intersection_of_geometries<ML, ML, ML> tester;
@@ -1599,7 +1627,7 @@ BOOST_AUTO_TEST_CASE( test_intersection_ml_ml_spikes )
          "mlmli-spikes-17"
          );
 
-    // test cases sent by Adam on the mailing list (equal slikes)
+    // test cases sent by Adam on the mailing list (equal spikes)
     tester::apply
         (from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),
          from_wkt<ML>("MULTILINESTRING((0 0,1 1,0 0))"),