]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/geometry/test/algorithms/set_operations/union/union_multi.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / geometry / test / algorithms / set_operations / union / union_multi.cpp
index c76bbcd5e8fce9625e959b7010eb7a05dd6c1442..53c70844b54620c3a0259e196abf5a030f75e062 100644 (file)
@@ -34,7 +34,7 @@
     ( #caseid, caseid[0], caseid[1], clips, holes, points, area)
 
 #define TEST_UNION_IGNORE(caseid, clips, holes, points, area) \
-   { ut_settings ignore_validity; ignore_validity.test_validity = false; \
+   { ut_settings ignore_validity; ignore_validity.set_test_validity(false); \
      test_one<Polygon, MultiPolygon, MultiPolygon> \
      (#caseid, caseid[0], caseid[1], \
      clips, holes, points, area, ignore_validity); }
@@ -43,6 +43,8 @@
 template <typename Ring, typename Polygon, typename MultiPolygon>
 void test_areal()
 {
+    using ct = typename bg::coordinate_type<Ring>::type;
+
     test_one<Polygon, MultiPolygon, MultiPolygon>("simplex_multi",
         case_multi_simplex[0], case_multi_simplex[1],
         1, 0, 20, 14.58);
@@ -364,7 +366,7 @@ void test_areal()
     TEST_UNION(case_recursive_boxes_79, 1, 2, -1, 14.75);
 
     // No hole should be generated (but rescaling generates one hole)
-    TEST_UNION(case_recursive_boxes_80, 2, BG_IF_RESCALED(1, 0), -1, 1.5);
+    TEST_UNION(case_recursive_boxes_80, 2, BG_IF_RESCALED(bg_if_mp<ct>(0, 1), 0), -1, 1.5);
 
     TEST_UNION(case_recursive_boxes_81, 5, 0, -1, 15.5);
     TEST_UNION(case_recursive_boxes_82, 2, 2, -1, 20.25);
@@ -384,16 +386,16 @@ void test_areal()
 
     test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20140212_sybren",
          ggl_list_20140212_sybren[0], ggl_list_20140212_sybren[1],
-         2, 0, 16, 0.002471626);
+         2, bg_if_mp<ct>(1, 0), -1, 0.002471626);
 
     {
         // Generates either 4 or 3 output polygons
         // With rescaling the result is invalid.
         ut_settings settings;
-        settings.test_validity = BG_IF_RESCALED(false, true);
+        settings.set_test_validity(BG_IF_RESCALED(false, true));
         test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
             ticket_9081[0], ticket_9081[1],
-            BG_IF_RESCALED(4, 3), 0, 31, 0.2187385,
+            BG_IF_RESCALED(bg_if_mp<ct>(3, 4), 3), 0, -1, 0.2187385,
             settings);
     }
 
@@ -422,7 +424,7 @@ void test_areal()
 #endif
     TEST_UNION(issue_630_b, 1, 0, -1, 1.675976);
 #if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
-    // Failure with Kramer rule
+    // Failure with Kramer rule, it doesn't generate any output
     TEST_UNION(issue_630_c, 1, 0, -1, 1.670367);
 #endif
 
@@ -467,12 +469,9 @@ void test_specific()
     typedef bg::model::polygon<Point, ClockWise, Closed> polygon;
     typedef bg::model::multi_polygon<polygon> multi_polygon;
 
-    ut_settings settings;
-    settings.test_validity = true;
-
     test_one<polygon, multi_polygon, multi_polygon>("ticket_10803",
         ticket_10803[0], ticket_10803[1],
-        1, 0, 9, 2664270, settings);
+        1, 0, 9, 2664270);
 }
 
 
@@ -483,16 +482,14 @@ int test_main(int, char* [])
 
 #if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
     test_all<bg::model::d2::point_xy<double>, false, false>();
-
-    test_specific<bg::model::d2::point_xy<int>, false, false>();
-
     test_all<bg::model::d2::point_xy<float>, true, true>();
+    test_all<bg::model::d2::point_xy<mp_test_type>, true, true>();
 
-#if defined(HAVE_TTMATH)
-    std::cout << "Testing TTMATH" << std::endl;
-    test_all<bg::model::d2::point_xy<ttmath_big> >();
+    test_specific<bg::model::d2::point_xy<int>, false, false>();
 #endif
 
+#if defined(BOOST_GEOMETRY_TEST_FAILURES)
+    BoostGeometryWriteExpectedFailures(9, 2, 1, 0);
 #endif
 
     return 0;