[test] with corrected validity, update testcases

This commit is contained in:
Barend Gehrels 2017-07-05 16:44:25 +02:00
parent 114bca9f55
commit bcbcbf8a74
2 changed files with 15 additions and 5 deletions

View File

@ -41,11 +41,13 @@
( #caseid, caseid[0], caseid[1], clips1, -1, area1, clips2, -1, area2, \
clips3, -1, area1 + area2)
#if !defined(BOOST_GEOMETRY_INCLUDE_SELF_TURNS)
#define TEST_DIFFERENCE_IGNORE(caseid, clips1, area1, clips2, area2, clips3) \
{ ut_settings ignore_validity; ignore_validity.test_validity = false; \
(test_one<polygon, polygon, polygon>) \
( #caseid, caseid[0], caseid[1], clips1, -1, area1, clips2, -1, area2, \
clips3, -1, area1 + area2, ignore_validity); }
#endif
template <typename P>
void test_all()
@ -368,10 +370,18 @@ void test_all()
}
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
test_one<polygon, polygon, polygon>("ggl_list_20110820_christophe",
ggl_list_20110820_christophe[0], ggl_list_20110820_christophe[1],
1, -1, 2.8570121719168924,
1, -1, 64.498061986388564);
{
// symmetric difference is not valid due to robustness issue, it has
// two turns (touch_only) and a midpoint is located in other polygon
ut_settings ignore_validity;
ignore_validity.test_validity = false;
test_one<polygon, polygon, polygon>("ggl_list_20110820_christophe",
ggl_list_20110820_christophe[0], ggl_list_20110820_christophe[1],
1, -1, 2.8570121719168924,
1, -1, 64.498061986388564,
ignore_validity);
}
#endif
test_one<polygon, polygon, polygon>("ggl_list_20120717_volker",

View File

@ -106,7 +106,7 @@ void test_areal()
TEST_DIFFERENCE(case_123_multi, 1, 0.25, 2, 0.625, 3);
TEST_DIFFERENCE(case_124_multi, 1, 0.25, 2, 0.4375, 3);
TEST_DIFFERENCE_IGNORE(case_125_multi, 1, 0.25, 2, 0.400, 3);
TEST_DIFFERENCE(case_125_multi, 1, 0.25, 2, 0.400, 3);
// A should have 3 clips, B should have 5 clips
#ifdef BOOST_GEOMETRY_INCLUDE_SELF_TURNS