[setops] Disable validity testing for several cases.

This commit is contained in:
Adam Wulkiewicz 2019-01-25 21:13:28 +01:00
parent 5ea1abcedc
commit 2e19b75876
3 changed files with 37 additions and 14 deletions

View File

@ -63,6 +63,11 @@ void test_all()
sym_settings.sym_difference = false;
#endif
ut_settings ignore_validity_settings;
#ifndef BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS
ignore_validity_settings.test_validity = false;
#endif
test_one<polygon, polygon, polygon>("simplex_normal",
simplex_normal[0], simplex_normal[1],
3, 12, 2.52636706856656,
@ -156,12 +161,14 @@ void test_all()
test_one<polygon, polygon, polygon>("intersect_holes_intersect_and_disjoint",
intersect_holes_intersect_and_disjoint[0], intersect_holes_intersect_and_disjoint[1],
2, 16, 15.75,
3, 17, 6.75);
3, 17, 6.75,
ignore_validity_settings);
test_one<polygon, polygon, polygon>("intersect_holes_intersect_and_touch",
intersect_holes_intersect_and_touch[0], intersect_holes_intersect_and_touch[1],
3, 21, 16.25,
3, 17, 6.25);
3, 17, 6.25,
ignore_validity_settings);
{
ut_settings settings = sym_settings;
@ -186,7 +193,8 @@ void test_all()
test_one<polygon, polygon, polygon>("intersect_holes_intersect",
intersect_holes_intersect[0], intersect_holes_intersect[1],
2, 16, 15.75,
2, 12, 5.75);
2, 12, 5.75,
ignore_validity_settings);
test_one<polygon, polygon, polygon>(
"case4", case_4[0], case_4[1],

View File

@ -175,12 +175,19 @@ void test_areal()
TEST_DIFFERENCE_WITH(0, 1, bug_21155501, 1, 3.758937, 1, 1.7763568394002505e-15, 2);
}
#else
// With no-robustness this one misses one of the outputs
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
ticket_9081[0], ticket_9081[1],
{
// With no-robustness this one misses one of the outputs
ut_settings settings;
settings.percentage = 0.001; // tolerance
#if !defined(BOOST_GEOMETRY_NO_ROBUSTNESS) && !defined(BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS)
settings.test_validity = false;
#endif
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
ticket_9081[0], ticket_9081[1],
2, 28, 0.0907392476356186, 4, 25, 0.126018011439877,
4, 42, 0.0907392476356186 + 0.126018011439877,
tolerance(0.001));
settings);
}
// With rescaling, A is invalid (this is a robustness problem) and the other
// output is discarded because of zero (rescaled) area

View File

@ -431,14 +431,22 @@ void test_areal()
ggl_list_20140212_sybren[0], ggl_list_20140212_sybren[1],
2, 0, 16, 0.002471626);
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
ticket_9081[0], ticket_9081[1],
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
3,
#else
4,
{
ut_settings settings;
#if !defined(BOOST_GEOMETRY_NO_ROBUSTNESS) && !defined(BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS)
settings.test_validity = false;
#endif
0, 31, 0.2187385);
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
ticket_9081[0], ticket_9081[1],
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
3,
#else
4,
#endif
0, 31, 0.2187385,
settings);
}
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_10803",
ticket_10803[0], ticket_10803[1],