[test] updates in expectations and defines

This commit is contained in:
Barend Gehrels 2019-11-13 11:50:29 +01:00
parent 090e2c4e4a
commit fbf333c8a7
8 changed files with 105 additions and 62 deletions

View File

@ -368,9 +368,7 @@ void test_all()
test_one<multi_polygon_type, polygon_type>("rt_d", rt_d, join_round, end_flat, 18.8726, 0.3);
test_one<multi_polygon_type, polygon_type>("rt_e", rt_e, join_round, end_flat, 14.1866, 0.3);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_g1", rt_g1, join_round, end_flat, 24.719, 1.0);
#endif
test_one<multi_polygon_type, polygon_type>("rt_g3", rt_g3, join_miter, end_flat, 16.5711, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_d", rt_d, join_miter, end_flat, 19.8823, 0.3);
@ -386,8 +384,8 @@ void test_all()
test_one<multi_polygon_type, polygon_type>("rt_i", rt_i, join_round, end_flat, 10.7528, 1.0);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_i", rt_i, join_miter, end_flat, 13.6569, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_j", rt_j, join_round, end_flat, 28.7309, 1.0);
#endif
test_one<multi_polygon_type, polygon_type>("rt_j", rt_j, join_round, end_flat, 28.7309, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_j", rt_j, join_miter, end_flat, 35.1421, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_k", rt_k, join_round, end_flat, 42.0092, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_k", rt_k, join_miter, end_flat, 48.0563, 1.0);
@ -413,15 +411,12 @@ void test_all()
test_one<multi_polygon_type, polygon_type>("rt_p5", rt_p5, join_miter, end_flat, 17.0, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_p6", rt_p6, join_miter, end_flat, 18.4853, 1.0);
#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_p7", rt_p7, join_miter, end_flat, 26.2279, 1.0);
#endif
test_one<multi_polygon_type, polygon_type>("rt_p8", rt_p8, join_miter, end_flat, 29.0563, 1.0);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_p9", rt_p9, join_miter, end_flat, 26.1421, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_p8", rt_p8, join_miter, end_flat, 29.0563, 1.0);
#endif
test_one<multi_polygon_type, polygon_type>("rt_p9", rt_p9, join_miter, end_flat, 26.1421, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_p10", rt_p10, join_miter, end_flat, 23.3995, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_p11", rt_p11, join_miter, end_flat, 28.7426, 1.0);
@ -429,17 +424,21 @@ void test_all()
test_one<multi_polygon_type, polygon_type>("rt_p13", rt_p13, join_miter, end_flat, 19.9142, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_p14", rt_p14, join_miter, end_flat, 20.8284, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_p15", rt_p15, join_miter, end_flat, 23.6569, 1.0);
#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
//#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_p16", rt_p16, join_miter, end_flat, 23.4853, 1.0);
#endif
//#endif
test_one<multi_polygon_type, polygon_type>("rt_p17", rt_p17, join_miter, end_flat, 25.3137, 1.0);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_p18", rt_p18, join_miter, end_flat, 23.3137, 1.0);
#endif
test_one<multi_polygon_type, polygon_type>("rt_p19", rt_p19, join_miter, end_flat, 25.5637, 1.0);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_p20", rt_p20, join_miter, end_flat, 25.4853, 1.0);
#endif
test_one<multi_polygon_type, polygon_type>("rt_p21", rt_p21, join_miter, end_flat, 17.1716, 1.0);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_p22", rt_p22, join_miter, end_flat, 26.5711, 1.0);
#endif
@ -447,8 +446,8 @@ void test_all()
test_one<multi_polygon_type, polygon_type>("rt_q2", rt_q2, join_miter, end_flat, 26.4853, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_q2", rt_q2, join_miter, end_flat, 0.9697, -0.25);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_r", rt_r, join_miter, end_flat, 21.0761, 1.0);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<multi_polygon_type, polygon_type>("rt_s1", rt_s1, join_miter, end_flat, 20.4853, 1.0);
#endif
@ -515,7 +514,9 @@ void test_all()
int test_main(int, char* [])
{
test_all<true, bg::model::point<double, 2, bg::cs::cartesian> >();
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
test_all<false, bg::model::point<double, 2, bg::cs::cartesian> >();
#endif
//test_all<bg::model::point<ttmath_big, 2, bg::cs::cartesian> >();
return 0;

View File

@ -374,9 +374,7 @@ void test_all()
test_one<polygon_type, polygon_type>("snake4", snake, join_miter, end_flat, 64.44, 0.4);
test_one<polygon_type, polygon_type>("snake5", snake, join_miter, end_flat, 72, 0.5);
test_one<polygon_type, polygon_type>("snake6", snake, join_miter, end_flat, 75.44, 0.6);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<polygon_type, polygon_type>("snake16", snake, join_miter, end_flat, 114.24, 1.6);
#endif
test_one<polygon_type, polygon_type>("funnelgate2", funnelgate, join_miter, end_flat, 120.982, 2.0);
test_one<polygon_type, polygon_type>("funnelgate3", funnelgate, join_miter, end_flat, 13.0*13.0, 3.0);
@ -833,11 +831,15 @@ int test_main(int, char* [])
typedef bg::model::point<double, 2, bg::cs::cartesian> dpoint;
test_all<true, dpoint>();
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
test_all<false, dpoint>();
#endif
typedef bg::model::point<float, 2, bg::cs::cartesian> fpoint;
test_deflate_special_cases<true, fpoint>();
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
test_deflate_special_cases<true, dpoint>();
#endif
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)

View File

@ -200,8 +200,8 @@ void test_all()
8, 36, 2.43452380952381,
7, 33, 3.18452380952381);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
// Fails, a-b is partly generated, b-a does not have any output
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Fails with rescaling, a-b is partly generated, b-a does not have any output
// It failed already in 1.59
test_one<polygon, polygon, polygon>("case_58_iet",
case_58[0], case_58[2],
@ -215,8 +215,8 @@ void test_all()
1, 9, 44.5,
1, 10, 84.5);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
// Fails, holes are not subtracted
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Fails without rescaling, holes are not subtracted
test_one<polygon, polygon, polygon>("case_81",
case_81[0], case_81[1],
1, 8, 80.5,
@ -244,42 +244,42 @@ void test_all()
TEST_DIFFERENCE(case_106, 1, 17.5, 2, 32.5, 3);
TEST_DIFFERENCE(case_107, 2, 18.0, 2, 29.0, 4);
TEST_DIFFERENCE(case_precision_1, 1, 14.0, 1, BG_IF_RESCALED(8.00001, 8.0), 1);
TEST_DIFFERENCE(case_precision_1, 1, 14.0, 1, BG_IF_KRAMER(8.00001, 8.0), 1);
TEST_DIFFERENCE(case_precision_2, 1, 14.0, 1, 8.0, 1);
TEST_DIFFERENCE(case_precision_3, 1, 14.0, 1, 8.0, 1);
TEST_DIFFERENCE(case_precision_4, 1, 14.0, 1, 8.0, 1);
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
TEST_DIFFERENCE(case_precision_5, 1, 14.0, 1, 8.0, 1);
TEST_DIFFERENCE(case_precision_6, 0, 0.0, 1, 57.0, 1);
#endif
TEST_DIFFERENCE(case_precision_7, 1, 14.0, 1, 8.0, 1);
TEST_DIFFERENCE(case_precision_8, 0, 0.0, 1, 59.0, 1);
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
TEST_DIFFERENCE(case_precision_9, 0, 0.0, 1, 59.0, 1);
TEST_DIFFERENCE(case_precision_10, 0, 0.0, 1, 59.0, 1);
#endif
TEST_DIFFERENCE(case_precision_11, 0, 0.0, 1, 59.0, 1);
#endif
TEST_DIFFERENCE(case_precision_12, 1, 12.0, 0, 0.0, 1);
TEST_DIFFERENCE(case_precision_13, 1, BG_IF_RESCALED(12.00002, 12.0), 0, 0.0, 1);
TEST_DIFFERENCE(case_precision_13, 1, BG_IF_KRAMER(12.00002, 12.0), 0, 0.0, 1);
TEST_DIFFERENCE(case_precision_14, 1, 14.0, 1, 8.0, 1);
TEST_DIFFERENCE(case_precision_15, 0, 0.0, 1, 59.0, 1);
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
TEST_DIFFERENCE(case_precision_16, 0, 0.0, 1, 59.0, 1);
#endif
TEST_DIFFERENCE(case_precision_17, 0, 0.0, 1, 59.0, 1);
TEST_DIFFERENCE(case_precision_18, 0, 0.0, 1, 59.0, 1);
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
TEST_DIFFERENCE(case_precision_19, 0, 0.0, 1, 59.0, 1);
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
TEST_DIFFERENCE(case_precision_19, 1, 0.0, 1, 59.0, 2);
#endif
TEST_DIFFERENCE(case_precision_20, 1, 14.0, 1, 8.0, 1);
TEST_DIFFERENCE(case_precision_21, 1, 14.0, 1, 7.99999, 1);
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
TEST_DIFFERENCE(case_precision_22, 0, 0.0, 1, 59.0, 1);
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
TEST_DIFFERENCE(case_precision_23, 0, 0.0, 1, 59.0, 1);
#endif
TEST_DIFFERENCE(case_precision_24, 1, 14.0, 1, 8.0, 1);
TEST_DIFFERENCE(case_precision_25, 1, 14.0, 1, 7.99999, 1);
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
#if ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
TEST_DIFFERENCE(case_precision_26, 0, 0.0, 1, 59.0, 1);
#endif
@ -345,17 +345,17 @@ void test_all()
settings);
}
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
{
ut_settings settings;
settings.percentage = 0.01;
settings.percentage = 0.1;
settings.test_validity = false;
// SQL Server gives: 0.28937764436705 and 0.000786406897532288 with 44/35 rings
// PostGIS gives: 0.30859375 and 0.033203125 with 35/35 rings
TEST_DIFFERENCE_WITH(geos_1,
-1, BG_IF_KRAMER(0.29171, 0.189697476),
-1, BG_IF_KRAMER(0.00076855, 0.000018266),
-1, BG_IF_KRAMER(0.29171, 0.20705),
-1, BG_IF_KRAMER(0.00076855, 0.00060440758),
-1);
}
#endif
@ -486,7 +486,7 @@ void test_all()
{
ut_settings settings;
settings.test_validity = BG_IF_RESCALED(true, false);
#if !defined(BOOST_GEOMETRY_USE_RESCALING) && defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) && defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
const int expected_count = 1; // Wrong, considers all consecutive polygons as one
#else
const int expected_count = 6;

View File

@ -154,7 +154,7 @@ void test_areal()
{
// With rescaling, A is invalid (this is a robustness problem) and the other
// output is discarded because of zero (rescaled) area
// output is discarded because of zero area
// POSTGIS areas: 3.75893745345145, 2.5810000723917e-15
ut_settings settings;
settings.sym_difference = BG_IF_RESCALED(false, true);
@ -163,7 +163,8 @@ void test_areal()
// No output for B
TEST_DIFFERENCE_WITH(0, 1, bug_21155501, 1, 3.758937, 0, 0.0, 1);
#else
// Very small sliver for B
// Very small sliver for B, and sym difference is not considered valid
settings.test_validity = false;
TEST_DIFFERENCE_WITH(0, 1, bug_21155501, 1, 3.758937, 1, 1.7763568394002505e-15, 2);
#endif
}
@ -174,8 +175,10 @@ void test_areal()
ut_settings settings;
settings.percentage = 0.001;
settings.test_validity = BG_IF_RESCALED(false, true);
TEST_DIFFERENCE_WITH(0, 1, ticket_9081, 2, 0.0907392476356186,
4, 0.126018011439877, BG_IF_RESCALED(4, 3));
TEST_DIFFERENCE_WITH(0, 1, ticket_9081,
2, 0.0907392476356186,
4, 0.126018011439877,
BG_IF_RESCALED(4, 3));
}
#endif
@ -319,7 +322,8 @@ void test_areal()
TEST_DIFFERENCE(case_recursive_boxes_60, 6, 5.25, 7, 5.25, 11);
TEST_DIFFERENCE(case_recursive_boxes_61, 2, 1.5, 6, 2.0, 7);
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
// Misses one triangle. It is NOT related to rescaling.
// Misses one triangle, should be fixed in traversal.
// It is not related to rescaling.
TEST_DIFFERENCE(case_recursive_boxes_62, 5, 5.0, 11, 5.75, 12);
#endif
@ -349,7 +353,7 @@ void test_areal()
TEST_DIFFERENCE(case_recursive_boxes_82, 5, 7.25, 7, 4.5, 8);
TEST_DIFFERENCE(case_recursive_boxes_83, 9, 5.25, 8, 5.25, 12);
TEST_DIFFERENCE(case_recursive_boxes_84, 4, 8.0, 7, 9.0, 4);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
TEST_DIFFERENCE(case_recursive_boxes_85, 4, 4.0, 7, 3.75, 9);
#endif
@ -401,7 +405,11 @@ void test_specific_areal()
settings.sym_difference = false;
settings.test_validity = false;
TEST_DIFFERENCE_WITH(0, 1, ticket_11674, 3, 9105781.5, 5, 119059.5, -1);
TEST_DIFFERENCE_WITH(0, 1, ticket_11674,
BG_IF_KRAMER(3, 4),
BG_IF_KRAMER(9105781.5, 9105473.5),
5,
BG_IF_KRAMER(119059.5, 119423), -1);
}
{
@ -411,8 +419,21 @@ void test_specific_areal()
ut_settings settings;
settings.remove_spikes = true;
TEST_DIFFERENCE_WITH(0, 1, ticket_12751, 1, 2781965.0, 1, 597.0, 2);
TEST_DIFFERENCE_WITH(2, 3, ticket_12751, 2, 2537992.5, 2, 294963.5, 3);
TEST_DIFFERENCE_WITH(0, 1, ticket_12751, 1,
BG_IF_KRAMER(2781965.0, 2782114), 1,
BG_IF_KRAMER(597.0, 598.0), 2);
#if ! defined(BOOST_GEOMETRY_USE_KRAMER)
// Fails with general line form intersection, symmetric version misses one outcut
// TODO GENERAL FORM
settings.test_validity = false;
settings.sym_difference = false;
#endif
TEST_DIFFERENCE_WITH(2, 3, ticket_12751,
2, BG_IF_KRAMER(2537992.5, 2538305),
2, BG_IF_KRAMER(294963.5, 294737),
3);
}
{
@ -421,25 +442,42 @@ void test_specific_areal()
ut_settings settings;
settings.remove_spikes = true;
settings.sym_difference = false;
TEST_DIFFERENCE_WITH(0, 1, ticket_12752, 3, 2776692.0, 3, 7893.0, 2);
TEST_DIFFERENCE_WITH(0, 1, ticket_12752,
BG_IF_KRAMER(3, 2), BG_IF_KRAMER(2776692.0, 2776657),
3, BG_IF_KRAMER(7893.0, 7710.5),
2);
}
{
std::string a_min_b =
#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Fails completely with general line form intersection
// There is something with scale.
// TODO GENERAL FORM
const std::string a_min_b =
TEST_DIFFERENCE(ticket_10661, 2, 1441632.5, 2, 13167454, 4);
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_10661_2",
a_min_b, ticket_10661[2],
1, 8, 825192.0,
1, 10, 27226370.5,
1, 10, BG_IF_KRAMER(27226370.5, 27842811),
1, -1, 825192.0 + 27226370.5);
#endif
}
{
ut_settings settings;
settings.sym_difference = false;
TEST_DIFFERENCE_WITH(0, 1, ticket_9942, 4, 7427727.5, 4, 131506, 4);
TEST_DIFFERENCE_WITH(0, 1, ticket_9942a, 2, 412676.5, 2, 76779.5, 4);
#if defined(BOOST_GEOMETRY_USE_KRAMER) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Fails with general line form intersection
// Misses one clip
// TODO GENERAL FORM
TEST_DIFFERENCE_WITH(0, 1, ticket_9942, 4, 7427727.5, 4,
BG_IF_KRAMER(131506, 130083.5), 4);
#endif
TEST_DIFFERENCE_WITH(0, 1, ticket_9942a, 2,
BG_IF_KRAMER(412676.5, 413183.5), 2,
BG_IF_KRAMER(76779.5, 76924), 4);
}
}

View File

@ -192,7 +192,7 @@ void test_areal()
{
test_one<Polygon, Polygon, Polygon>("geos_1",
geos_1[0], geos_1[1],
1, -1, 3461.12321694, // MSVC 14 reports 3461.025390625
1, -1, BG_IF_RESCALED(3461.12321694, BG_IF_KRAMER(3461.02336, 3461.105448)), // MSVC 14 reports 3461.025390625
ut_settings(0.01, false));
}
@ -256,7 +256,7 @@ void test_areal()
TEST_INTERSECTION(ggl_list_20190307_matthieu_1, 2, -1, 0.035136);
TEST_INTERSECTION(ggl_list_20190307_matthieu_2, 1, -1, 3.64285);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || !defined(BOOST_GEOMETRY_USE_KRAMER_RULE)
#if defined(BOOST_GEOMETRY_USE_RESCALING) || ! defined(BOOST_GEOMETRY_USE_KRAMER_RULE) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<Polygon, Polygon, Polygon>("buffer_rt_f", buffer_rt_f[0], buffer_rt_f[1],
1, 4, 0.00029437899183903937, ut_settings(0.01));
#endif

View File

@ -137,13 +137,10 @@ void test_areal()
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
{
ut_settings ignore_validity;
// Rescaling misses one intersection
test_one<Polygon, MultiPolygon, MultiPolygon>("case_108_multi",
case_108_multi[0], case_108_multi[1],
7, -1, 7.5,
ignore_validity);
7, -1, 7.5);
}
#endif
@ -326,7 +323,7 @@ void test_areal()
TEST_INTERSECTION(case_recursive_boxes_82, 5, -1, 8.5);
TEST_INTERSECTION(case_recursive_boxes_83, 5, -1, 10.25);
TEST_INTERSECTION(case_recursive_boxes_84, 1, -1, 0.5);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
TEST_INTERSECTION(case_recursive_boxes_85, 1, -1, 0.25);
#endif
TEST_INTERSECTION(case_recursive_boxes_86, 0, -1, 0.0);

View File

@ -34,6 +34,13 @@
(test_one<Polygon, Polygon, Polygon>) \
( #caseid "_rev", caseid[1], caseid[0], clips, holes, points, area)
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) \
&& defined(BOOST_GEOMETRY_USE_KRAMER_RULE) \
&& ! defined(BOOST_GEOMETRY_TEST_FAILURES)
// These testcases are failing for non-rescaled Kramer rule
#define BOOST_GEOMETRY_EXCLUDE
#endif
template <typename Ring, typename Polygon>
void test_areal()
@ -274,7 +281,7 @@ void test_areal()
TEST_UNION(case_precision_17, 1, 1, -1, 73.0);
TEST_UNION(case_precision_18, 1, 1, -1, 73.0);
TEST_UNION(case_precision_19, 1, 1, -1, 73.0);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
#if ! defined(BOOST_GEOMETRY_EXCLUDE)
TEST_UNION(case_precision_20, 1, 0, -1, 22.0);
#endif
TEST_UNION(case_precision_21, 1, 0, -1, 22.0);
@ -303,7 +310,7 @@ void test_areal()
TEST_UNION_REV(case_precision_17, 1, 1, -1, 73.0);
TEST_UNION_REV(case_precision_18, 1, 1, -1, 73.0);
TEST_UNION_REV(case_precision_19, 1, 1, -1, 73.0);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
#if ! defined(BOOST_GEOMETRY_EXCLUDE)
TEST_UNION_REV(case_precision_20, 1, 0, -1, 22.0);
#endif
TEST_UNION_REV(case_precision_21, 1, 0, -1, 22.0);
@ -362,7 +369,7 @@ void test_areal()
ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1],
1, 1, 15, 129904.197692871);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
#if ! defined(BOOST_GEOMETRY_EXCLUDE)
test_one<Polygon, Polygon, Polygon>("ggl_list_20110820_christophe",
ggl_list_20110820_christophe[0], ggl_list_20110820_christophe[1],
-1, // Either 1 or 2, depending if the intersection/turn point (eps.region) is missed
@ -444,7 +451,7 @@ void test_areal()
test_one<Polygon, Polygon, Polygon>("ticket_11725", ticket_11725[0], ticket_11725[1],
1, 1, 10, 7.5);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// With rescaling an extra overlapping polygon is generated
TEST_UNION(issue_548, 1, 0, -1, 617382720000);
#endif
@ -480,7 +487,7 @@ void test_areal()
test_one<Polygon, Polygon, Polygon>("buffer_rt_a_rev", buffer_rt_a[1], buffer_rt_a[0],
1, 0, -1, 19.28, settings);
}
#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
#if ! defined(BOOST_GEOMETRY_EXCLUDE)
test_one<Polygon, Polygon, Polygon>("buffer_rt_f", buffer_rt_f[0], buffer_rt_f[1],
1, 0, -1, 4.60853);
test_one<Polygon, Polygon, Polygon>("buffer_rt_f_rev", buffer_rt_f[1], buffer_rt_f[0],
@ -490,7 +497,7 @@ void test_areal()
1, 0, -1, 16.571);
test_one<Polygon, Polygon, Polygon>("buffer_rt_g_rev", buffer_rt_g[1], buffer_rt_g[0],
1, 0, -1, 16.571);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
#if ! defined(BOOST_GEOMETRY_EXCLUDE)
test_one<Polygon, Polygon, Polygon>("buffer_rt_i", buffer_rt_i[0], buffer_rt_i[1],
1, 0, -1, 13.6569);
#endif
@ -521,7 +528,7 @@ void test_areal()
1, 0, -1, 18.5710);
test_one<Polygon, Polygon, Polygon>("buffer_rt_q_rev", buffer_rt_q[1], buffer_rt_q[0],
1, 0, -1, 18.5710);
#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
#if ! defined(BOOST_GEOMETRY_EXCLUDE)
test_one<Polygon, Polygon, Polygon>("buffer_rt_r", buffer_rt_r[0], buffer_rt_r[1],
1, 0, -1, 21.07612);
test_one<Polygon, Polygon, Polygon>("buffer_rt_r_rev", buffer_rt_r[1], buffer_rt_r[0],

View File

@ -201,11 +201,9 @@ bool test_buffer(MultiPolygon& result, int& index,
typedef typename bg::coordinate_type<MultiPolygon>::type coordinate_type;
typedef typename bg::point_type<MultiPolygon>::type point_type;
typedef bg::strategy::buffer::distance_asymmetric<coordinate_type> distance_strategy_type;
distance_strategy_type distance_strategy(settings.distance, settings.distance);
typedef typename boost::range_value<MultiPolygon>::type polygon_type;
MultiPolygon buffered;
std::ostringstream out;