diff --git a/test/algorithms/set_operations/intersection/intersection.cpp b/test/algorithms/set_operations/intersection/intersection.cpp index 4bcbf29d4..834456bea 100644 --- a/test/algorithms/set_operations/intersection/intersection.cpp +++ b/test/algorithms/set_operations/intersection/intersection.cpp @@ -46,9 +46,13 @@ BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector) (test_one) \ ( #caseid, caseid[0], caseid[1], clips, points, area) -#define TEST_INTERSECTION_IGNORE(caseid, clips, points, area) \ - (test_one) \ - ( #caseid, caseid[0], caseid[1], clips, points, area, ignore_validity) +#if ! defined(BOOST_GEOMETRY_INCLUDE_SELF_TURNS) + #define TEST_INTERSECTION_IGNORE(caseid, clips, points, area) \ + { ut_settings ignore_validity; \ + ignore_validity.test_validity = false; \ + (test_one) \ + ( #caseid, caseid[0], caseid[1], clips, points, area, ignore_validity); } +#endif template void test_areal() @@ -57,10 +61,6 @@ void test_areal() bool const ccw = bg::point_order::value == bg::counterclockwise; bool const open = bg::closure::value == bg::open; - ut_settings ignore_validity; - ignore_validity.test_validity = false; - - test_one("simplex_with_empty_1", simplex_normal[0], polygon_empty, 0, 0, 0.0); @@ -174,20 +174,21 @@ void test_areal() pie_2_3_23_0[0], pie_2_3_23_0[1], 1, 4, 163292.679042133, ut_settings(0.1)); + { + ut_settings settings(if_typed_tt(0.01, 0.1)); + #if defined(BOOST_GEOMETRY_NO_ROBUSTNESS) - test_one("isovist", - isovist1[0], isovist1[1], - 1, 19, 88.4178, - ignore_validity); -#else - // SQL Server gives: 88.1920416352664 - // PostGIS gives: 88.19203677911 - test_one("isovist", - isovist1[0], isovist1[1], - 1, 19, 88.19203, - ut_settings(if_typed_tt(0.01, 0.1))); + settings.test_validity = false; #endif + // SQL Server gives: 88.1920416352664 + // PostGIS gives: 88.19203677911 + test_one("isovist", + isovist1[0], isovist1[1], + 1, 19, 88.192037, + settings); + } + test_one("geos_1", geos_1[0], geos_1[1], 1, -1, 3461.0214843, // MSVC 14 reports 3461.025390625 @@ -346,8 +347,13 @@ void test_areal() case_102[0], case_102[1], 0, -1, 3.1875); +#ifdef BOOST_GEOMETRY_INCLUDE_SELF_TURNS + TEST_INTERSECTION(case_103, 2, -1, 3.5); + TEST_INTERSECTION(case_104, 3, -1, 3.0); +#else TEST_INTERSECTION_IGNORE(case_103, 0, -1, 3.5); TEST_INTERSECTION_IGNORE(case_104, 0, -1, 3.0); +#endif test_one("mysql_21964049", mysql_21964049[0], mysql_21964049[1],