Remove rescaling: remove BOOST_GEOMETRY_USE_RESCALING and update BoostGeometryWriteExpectedFailures

This commit is contained in:
Vissarion Fisikopoulos
2024-05-28 14:32:33 +03:00
parent 64268dd19e
commit d3ed449e39
21 changed files with 35 additions and 198 deletions

View File

@@ -103,10 +103,8 @@ void test_one(std::string const& caseid, std::string const& wkt, double expected
settings.tolerance = 10000.0;
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
// in case robustness policies are changed, areas should be adapted
settings.tolerance = boost::starts_with(caseid, "no") ? 200000.0 : 100000.0;
#endif
test_one<MP, P>(caseid, wkt, join_round, end_flat,
expected_area, distance * 1000.0, settings);
@@ -213,7 +211,7 @@ int test_main(int, char* [])
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
BoostGeometryWriteExpectedFailures(1, BG_NO_FAILURES, 2, BG_NO_FAILURES);
BoostGeometryWriteExpectedFailures(BG_NO_FAILURES, 2, BG_NO_FAILURES);
#endif
return 0;

View File

@@ -330,7 +330,6 @@ void test_all()
test_one<linestring, polygon>("issue_803", issue_803, join_round(36), end_round(36), 1664.0528, 10.0);
}
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
{
using bg::strategy::buffer::join_round;
using bg::strategy::buffer::end_round;
@@ -338,7 +337,6 @@ void test_all()
test_one<linestring, polygon>("issue_988_b", issue_988, join_round(32), end_round(32), 0.0029614, 0.0101);
test_one<linestring, polygon>("issue_988_c", issue_988, join_round(32), end_round(32), 0.0031514, 0.011);
}
#endif
{
using bg::strategy::buffer::join_round;
@@ -366,24 +364,17 @@ void test_all()
test_one<linestring, polygon>("mysql_23023665_1", mysql_23023665, join_round32, end_flat, 459.1051, 10);
test_one<linestring, polygon>("mysql_23023665_2", mysql_23023665, join_round32, end_flat, 6877.7097, 50);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<linestring, polygon>("mysql_25662426", mysql_25662426, join_round32, end_round32, 1, 0, 1660.6673, 10);
#endif
// Test behaviour with different buffer sizes, generating internally turns on different locations
test_one<linestring, polygon>("mysql_25662426a_05", mysql_25662426a, join_round32, end_round32, 27.6156, 0.5);
test_one<linestring, polygon>("mysql_25662426a_1", mysql_25662426a, join_round32, end_round32, 54.9018, 1.0);
test_one<linestring, polygon>("mysql_25662426a_2", mysql_25662426a, join_round32, end_round32, 103.6072, 2.0);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<linestring, polygon>("mysql_25662426a_3", mysql_25662426a, join_round32, end_round32, 152.1163, 3.0);
#endif
test_one<linestring, polygon>("mysql_25662426a_4", mysql_25662426a, join_round32, end_round32, 206.4831, 4.0);
test_one<linestring, polygon>("mysql_25662426a_5", mysql_25662426a, join_round32, end_round32, 266.8505, 5.0);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
test_one<linestring, polygon>("mysql_25662426a_10", mysql_25662426a, join_round32, end_round32, 660.7355, 10.0);
#endif
test_one<linestring, polygon>("mysql_25662426a_05", mysql_25662426a, join_round32, end_flat, 26.8352, 0.5);
test_one<linestring, polygon>("mysql_25662426a_1", mysql_25662426a, join_round32, end_flat, 53.3411, 1.0);
test_one<linestring, polygon>("mysql_25662426a_2", mysql_25662426a, join_round32, end_flat, 97.3644, 2.0);
@@ -480,7 +471,7 @@ int test_main(int, char* [])
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
BoostGeometryWriteExpectedFailures(2, 4, 11, 3);
BoostGeometryWriteExpectedFailures(4, 11, 3);
#endif
return 0;

View File

@@ -257,7 +257,7 @@ void test_aimes()
double const aimes_width = width / 1000000.0;
for (int i = 0; i < n; i++)
{
#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
// There are 4 false positives
bool const possible_invalid = width == 18 && (i == 75 || i == 80 || i == 140);
settings.set_test_validity(! possible_invalid);
@@ -297,7 +297,7 @@ int test_main(int, char* [])
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
// Type float is not supported for these cases.
// Type double has (judging the svg) 4 false negatives for validity
BoostGeometryWriteExpectedFailures(0, 0, 0, 0);
BoostGeometryWriteExpectedFailures(0, 0, 0);
#endif
return 0;

View File

@@ -172,11 +172,7 @@ void test_all()
test_one<multi_linestring_type, polygon>("mysql_23023665_1",
mysql_23023665_1, join_round32, end_round32, 1, 1, 186.5504, 1.0);
test_one<multi_linestring_type, polygon>("touching1_1",
touching1, join_round32, end_round32, 2, 0, 78.70773, 1.0
#if defined(BOOST_GEOMETRY_USE_RESCALING)
, ut_settings::ignore_validity() // false positive, due to rescaling. As we remove it, it is gone
#endif
);
touching1, join_round32, end_round32, 2, 0, 78.70773, 1.0);
test_one<multi_linestring_type, polygon>("touching2_1",
touching2, join_round32, end_round32, 1, 1, 107.8991, 1.0);
test_one<multi_linestring_type, polygon>("mysql_23023665_1_09",
@@ -239,7 +235,7 @@ int test_main(int, char* [])
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
BoostGeometryWriteExpectedFailures(9, 6, 9, 3);
BoostGeometryWriteExpectedFailures(6, 9, 3);
#endif
return 0;
}

View File

@@ -547,11 +547,7 @@ void test_all()
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);
test_one<multi_polygon_type, polygon_type>("rt_p16", rt_p16, join_miter, end_flat, 23.4853, 1.0);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Fails with rescaling after correcting the tolerance in sort_by_side
test_one<multi_polygon_type, polygon_type>("rt_p17", rt_p17, join_miter, end_flat, 25.3137, 1.0);
#endif
test_one<multi_polygon_type, polygon_type>("rt_p18", rt_p18, join_miter, end_flat, 23.3137, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_p19", rt_p19, join_miter, end_flat, 25.5637, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_p20", rt_p20, join_miter, end_flat, 25.4853, 1.0);
@@ -577,15 +573,11 @@ void test_all()
test_one<multi_polygon_type, polygon_type>("rt_u4", rt_u4, join_round, end_flat, 126.9268, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u5", rt_u5, join_round, end_flat, 78.4906, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u6", rt_u6, join_round, end_flat, 115.4461, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u7", rt_u7, join_miter, end_flat, 42.6421, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u7", rt_u7, join_round, end_flat, 35.6233, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u7_rough", rt_u7, join_round_rough, end_flat, {35.1675, 35.2290}, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u8", rt_u8, join_miter, end_flat, 70.9142, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u9", rt_u9, join_miter, end_flat, 59.3063, 1.0);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Fails with rescaling after removing pretraversal
test_one<multi_polygon_type, polygon_type>("rt_u10", rt_u10, join_miter, end_flat, 144.0858, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u10_51", rt_u10, join_miter, end_flat, 0.16738, -0.51);
test_one<multi_polygon_type, polygon_type>("rt_u10_c_51", rt_u10_c, join_miter, end_flat, 0.066952, -0.51);
@@ -593,21 +585,12 @@ void test_all()
// TODO: invalid - making a bow-tie
test_one<multi_polygon_type, polygon_type>("rt_u10_50", rt_u10, join_miter, end_flat, 0.214466, -0.50, ut_settings::ignore_validity());
test_one<multi_polygon_type, polygon_type>("rt_u10_45", rt_u10, join_miter, end_flat, 1.3000, -0.45);
#endif
test_one<multi_polygon_type, polygon_type>("rt_u10_25", rt_u10, join_miter, end_flat, 9.6682, -0.25);
test_one<multi_polygon_type, polygon_type>("rt_u11", rt_u11, join_miter, end_flat, 131.3995, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_u11_50", rt_u11, join_miter, end_flat, 0.04289, -0.50);
test_one<multi_polygon_type, polygon_type>("rt_u11_25", rt_u11, join_miter, end_flat, 10.1449, -0.25);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Fails with rescaling after correcting the tolerance in sort_by_side
test_one<multi_polygon_type, polygon_type>("rt_u12", rt_u12, join_miter, end_flat, 142.1348, 1.0);
#endif
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Fails with rescaling in combination with get_clusters
test_one<multi_polygon_type, polygon_type>("rt_u13", rt_u13, join_miter, end_flat, 115.4853, 1.0);
#endif
test_one<multi_polygon_type, polygon_type>("rt_v1", rt_v1, join_round32, end_flat, 26.9994, 1.0);
test_one<multi_polygon_type, polygon_type>("rt_v2", rt_v2, join_round32, end_flat, 47.3510, 1.0);
@@ -655,10 +638,7 @@ void test_all()
test_one<multi_polygon_type, polygon_type>("nores_b03e", nores_b03e, join_round32, end_flat, 14.4877, 1.0);
test_one<multi_polygon_type, polygon_type>("res_ebc4", res_ebc4, join_round32, end_flat, 43.8877, 1.0);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Erroneous case with rescaling
test_one<multi_polygon_type, polygon_type>("res_8618", res_8618, join_round32, end_flat, 48.1085, 1.0);
#endif
test_one<multi_polygon_type, polygon_type>("res_3b4d", res_3b4d, join_round32, end_flat, 48.4739, 1.0);
test_one<multi_polygon_type, polygon_type>("neighbouring_small",
@@ -704,7 +684,7 @@ int test_main(int, char* [])
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
BoostGeometryWriteExpectedFailures(3, 1, 3, 3);
BoostGeometryWriteExpectedFailures(1, 3, 3);
#endif
return 0;

View File

@@ -948,7 +948,7 @@ int test_main(int, char* [])
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
BoostGeometryWriteExpectedFailures(2, 1, 9, 1);
BoostGeometryWriteExpectedFailures(1, 9, 1);
#endif
test_different();

View File

@@ -364,9 +364,6 @@ void test_overlay(std::string const& caseid,
<< "_" << string_from_type<typename bg::coordinate_type<Geometry>::type>::name()
<< (ccw ? "_ccw" : "")
<< (open ? "_open" : "")
#if defined(BOOST_GEOMETRY_USE_RESCALING)
<< "_rescaled"
#endif
<< ".svg";
std::ofstream svg(filename.str().c_str());

View File

@@ -685,7 +685,7 @@ int test_main(int, char* [])
// Not yet fully tested for float and long double.
// The difference algorithm can generate (additional) slivers
// Many of the failures are self-intersection points.
BoostGeometryWriteExpectedFailures(15, 5, 17, 10);
BoostGeometryWriteExpectedFailures(5, 17, 10);
#endif
return 0;

View File

@@ -525,7 +525,7 @@ int test_main(int, char* [])
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
// Not yet fully tested for float.
// The difference algorithm can generate (additional) slivers
BoostGeometryWriteExpectedFailures(24, 11, 21, 7);
BoostGeometryWriteExpectedFailures(11, 21, 7);
#endif
return 0;

View File

@@ -131,9 +131,6 @@ void difference_output(std::string const& caseid, G1 const& g1, G2 const& g2, Ou
<< string_from_type<coordinate_type>::name()
<< (ccw ? "_ccw" : "")
<< (open ? "_open" : "")
#if defined(BOOST_GEOMETRY_USE_RESCALING)
<< "_rescaled"
#endif
<< ".svg";
std::ofstream svg(filename.str().c_str());
@@ -258,18 +255,6 @@ std::string test_difference(std::string const& caseid, G1 const& g1, G2 const& g
#if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
#if defined(BOOST_GEOMETRY_USE_RESCALING)
if (expected_point_count >= 0)
{
std::size_t const n = bg::num_points(result);
BOOST_CHECK_MESSAGE(bg::math::abs(int(n) - expected_point_count) < 3,
"difference: " << caseid
<< " #points expected: " << expected_point_count
<< " detected: " << n
<< " type: " << (type_for_assert_message<G1, G2>())
);
}
#endif
if (! expected_count.empty())
{

View File

@@ -151,13 +151,9 @@ void test_areal()
simplex_normal[0], simplex_normal[1],
1, 7, 5.47363293);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Fails if rescaling is used in combination with get_clusters, because a cluster is generated
// and use as the start of the traversal
test_one<Polygon, Polygon, Polygon>("distance_zero",
distance_zero[0], distance_zero[1],
1, 0, 0.29516139);
#endif
test_one<Polygon, Polygon, Polygon>("equal_holes_disjoint",
equal_holes_disjoint[0], equal_holes_disjoint[1],
@@ -182,10 +178,10 @@ void test_areal()
pie_2_3_23_0[0], pie_2_3_23_0[1],
1, 4, 163292.679042133, ut_settings(0.1));
#if defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
TEST_INTERSECTION(isovist, 1, 19, expectation_limits(88.19202, 88.19206));
#else
// Reported as invalid without rescaling and get_clusters
// Reported as invalid
TEST_INTERSECTION_IGNORE(isovist, 1, 19, expectation_limits(88.19202, 88.19206));
#endif
@@ -296,20 +292,14 @@ void test_areal()
1, 8, 129.90381, settings);
}
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// With rescaling the output is empty
TEST_INTERSECTION(issue_548, 1, -1, expectation_limits(1958821942, 1958824416));
#endif
TEST_INTERSECTION(issue_566_a, 1, -1, 70.7107);
TEST_INTERSECTION(issue_566_b, 1, -1, 70.7107);
TEST_INTERSECTION(issue_838, 1, -1, (expectation_limits{0.6582, 0.6650}));
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// With rescaling the output is wrong
TEST_INTERSECTION(issue_861, 1, -1, 1.4715007684573677693e-10);
#endif
TEST_INTERSECTION(issue_1229, 0, -1, 0);
@@ -852,7 +842,7 @@ int test_main(int, char* [])
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
// llb_touch generates a polygon with 1 point and is therefore invalid everywhere
// TODO: this should be easy to fix
BoostGeometryWriteExpectedFailures(6, 2, 7, 1);
BoostGeometryWriteExpectedFailures(2, 7, 1);
#endif
return 0;

View File

@@ -134,15 +134,9 @@ void test_areal()
test_one<Polygon, MultiPolygon, MultiPolygon>("case_107_multi_inv_b",
case_107_multi[1], case_107_multi[2],
3, 13, 3.0);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
{
// Rescaling misses one intersection
test_one<Polygon, MultiPolygon, MultiPolygon>("case_108_multi",
case_108_multi[0], case_108_multi[1],
7, -1, 7.5);
}
#endif
test_one<Polygon, MultiPolygon, MultiPolygon>("case_108_multi",
case_108_multi[0], case_108_multi[1],
7, -1, 7.5);
TEST_INTERSECTION(case_123_multi, 3, 13, 1.875);
TEST_INTERSECTION(case_124_multi, 2, 13, 2.0625);
@@ -323,23 +317,15 @@ 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) || 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);
TEST_INTERSECTION(case_recursive_boxes_87, 0, -1, 0.0);
TEST_INTERSECTION(case_recursive_boxes_88, 4, -1, 3.5);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
TEST_INTERSECTION(case_precision_m1, 1, -1, 14.0);
TEST_INTERSECTION(case_precision_m2, 2, -1, 15.25);
TEST_INTERSECTION_REV(case_precision_m1, 1, -1, 14.0);
TEST_INTERSECTION_REV(case_precision_m2, 2, -1, 15.25);
#else
// Validity: false positives (very small triangles looking like a line)
TEST_INTERSECTION_IGNORE(case_precision_m1, 1, -1, 14.0);
TEST_INTERSECTION_IGNORE(case_precision_m2, 2, -1, 15.25);
#endif
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
@@ -363,20 +349,13 @@ void test_areal()
TEST_INTERSECTION(ticket_12503, 2, 13, 17.375);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Result is wrong with rescaling
TEST_INTERSECTION(issue_630_a, 1, -1, 0.1770);
#endif
TEST_INTERSECTION(issue_630_b, 1, -1, expectation_limits(0.1713911, 0.1714));
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// Result is missing with rescaling
TEST_INTERSECTION(issue_630_c, 1, -1, 0.1770);
// Result is missing with rescaling
TEST_INTERSECTION(issue_643, 1, -1, 3.4615);
#endif
TEST_INTERSECTION(issue_869_c, 3, -1, 3600);
@@ -501,17 +480,12 @@ int test_main(int, char* [])
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
BoostGeometryWriteExpectedFailures(9, 1, 2, 1);
BoostGeometryWriteExpectedFailures(1, 2, 1);
#endif
return 0;
}
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
//failing with rescaling on
// https://github.com/boostorg/geometry/issues/630
void testIntersection(const std::string& polyString, const std::string& multiPolyString)
@@ -551,5 +525,3 @@ BOOST_AUTO_TEST_CASE(Test3)
testIntersection("POLYGON((-0.3 -0.1475,-0.3 +0.1475,+0.3 +0.1475,+0.3 -0.1475,-0.3 -0.1475))",
"MULTIPOLYGON(((-0.9099999999999999 +0.4625,-0.1912799075873667 +1.181220092412633,+0.9707630752925609 +0.01917710953270602,+0.2520429828799277 -0.6995429828799273,-0.9099999999999999 +0.4625)))");
}
#endif

View File

@@ -166,16 +166,6 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
);
}
#if defined(BOOST_GEOMETRY_USE_RESCALING)
// Without rescaling, point count might easily differ (which is no problem)
BOOST_CHECK_MESSAGE(expected_point_count < 0 || std::abs(int(n) - expected_point_count) < 3,
"union: " << caseid
<< " #points expected: " << expected_point_count
<< " detected: " << n
<< " type: " << (type_for_assert_message<G1, G2>())
);
#endif
BOOST_CHECK_MESSAGE(expected_area.contains(area, settings.percentage),
"union: " << caseid << std::setprecision(20)
<< " #area expected: " << expected_area
@@ -197,9 +187,6 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
<< string_from_type<coordinate_type>::name()
<< (ccw ? "_ccw" : "")
<< (open ? "_open" : "")
#if defined(BOOST_GEOMETRY_USE_RESCALING)
<< "_rescaled"
#endif
<< ".svg";
std::ofstream svg(filename.str().c_str());

View File

@@ -419,24 +419,17 @@ void test_areal()
TEST_UNION(ticket_10108_a, count_set(1, 2), 0, 8, 0.0435229);
TEST_UNION(ticket_10108_b, count_set(1, 2), 0, 10, 2424.3449);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// With rescaling, there is a dependency on cluster tolerance, which alters the result.
TEST_UNION(ticket_10866, 1, 0, 14, 332760303.5);
#endif
TEST_UNION(ticket_11725, 1, 1, 10, 7.5);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
// With rescaling an extra overlapping polygon is generated, which is wrong
TEST_UNION(issue_548, 1, 0, -1, 617382720000);
#endif
TEST_UNION(issue_566_a, 1, 0, -1, 214.3728);
TEST_UNION(issue_566_b, 1, 0, -1, 214.3728);
TEST_UNION_REV(issue_566_a, 1, 0, -1, 214.3728);
TEST_UNION_REV(issue_566_b, 1, 0, -1, 214.3728);
#if ! defined(BOOST_GEOMETRY_USE_RESCALING) || defined(BOOST_GEOMETRY_TEST_FAILURES)
{
// With rescaling, the input (was already an output of a previous step)
// is somehow considered as invalid. Output is also invalid.
@@ -445,7 +438,6 @@ void test_areal()
settings.ignore_validity_on_invalid_input = false;
TEST_UNION_WITH(issue_690, 2, 0, -1, 25492.0505);
}
#endif
TEST_UNION(issue_838, 1, 0, -1, expectation_limits(1.3333, 1.33785));
TEST_UNION_REV(issue_838, 1, 0, -1, expectation_limits(1.3333, 1.33785));
@@ -552,7 +544,7 @@ void test_areal()
// Contains a self-intersection invalidity for ccw
ut_settings settings;
settings.set_test_validity(! is_ccw);
test_one<Polygon, Polygon, Polygon>("buffer_mp2",
test_one<Polygon, Polygon, Polygon>("buffer_mp2",
buffer_mp2[0], buffer_mp2[1],
1, -1, 217, 36.752837, settings);
}
@@ -652,7 +644,7 @@ int test_main(int, char* [])
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
BoostGeometryWriteExpectedFailures(4, 1, 2, 0);
BoostGeometryWriteExpectedFailures(1, 2, 0);
#endif
return 0;

View File

@@ -498,7 +498,7 @@ int test_main(int, char* [])
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
BoostGeometryWriteExpectedFailures(9, 0, 1, 0);
BoostGeometryWriteExpectedFailures(0, 1, 0);
#endif
return 0;

View File

@@ -185,11 +185,7 @@ inline T1 const& bg_if_mp(T1 const& value_mp, T2 const& value)
}
//! Macro for expectations depending on rescaling
#if defined(BOOST_GEOMETRY_USE_RESCALING)
#define BG_IF_RESCALED(a, b) a
#else
#define BG_IF_RESCALED(a, b) b
#endif
//! Macro for turning of a test setting when testing without failures
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
@@ -207,14 +203,6 @@ inline void BoostGeometryWriteTestConfiguration()
#if defined(BOOST_GEOMETRY_COMPILER_MODE_DEBUG)
std::cout << " - Debug mode" << std::endl;
#endif
#if defined(BOOST_GEOMETRY_ROBUSTNESS_ALTERNATIVE)
std::cout << " - Flipping the robustness alternative" << std::endl;
#endif
#if defined(BOOST_GEOMETRY_USE_RESCALING)
std::cout << " - Using rescaling" << std::endl;
#else
std::cout << " - No rescaling" << std::endl;
#endif
#if defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
std::cout << " - Testing only one type" << std::endl;
#endif
@@ -230,34 +218,28 @@ inline void BoostGeometryWriteTestConfiguration()
#ifdef BOOST_GEOMETRY_TEST_FAILURES
#define BG_NO_FAILURES 0
inline void BoostGeometryWriteExpectedFailures(std::size_t for_rescaling,
std::size_t for_no_rescaling_double,
std::size_t for_no_rescaling_float,
std::size_t for_no_rescaling_extended)
inline void BoostGeometryWriteExpectedFailures(std::size_t for_double,
std::size_t for_float,
std::size_t for_extended)
{
std::size_t const for_no_rescaling
= if_typed<default_test_type, double>(for_no_rescaling_double,
if_typed<default_test_type, float>(for_no_rescaling_float,
for_no_rescaling_extended));
std::size_t const expected
= if_typed<default_test_type, double>(for_double,
if_typed<default_test_type, float>(for_float,
for_extended));
boost::ignore_unused(for_rescaling, for_no_rescaling, for_no_rescaling_double,
for_no_rescaling_float, for_no_rescaling_extended);
boost::ignore_unused(expected, for_double, for_float, for_extended);
#if defined(BOOST_GEOMETRY_USE_RESCALING)
std::cout << "RESCALED - Expected: " << for_rescaling << " error(s)" << std::endl;
#elif defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE) && defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
std::cout << "NOT RESCALED - Expected: " << for_no_rescaling << " error(s)" << std::endl;
#if defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE) && defined(BOOST_GEOMETRY_TEST_ONLY_ONE_ORDER)
std::cout << "Expected: " << expected << " error(s)" << std::endl;
#else
std::cout << std::endl;
#endif
}
inline void BoostGeometryWriteExpectedFailures(std::size_t for_rescaling,
std::size_t for_no_rescaling_double = BG_NO_FAILURES)
inline void BoostGeometryWriteExpectedFailures(std::size_t for_double = BG_NO_FAILURES)
{
BoostGeometryWriteExpectedFailures(for_rescaling, for_no_rescaling_double,
for_no_rescaling_double, for_no_rescaling_double);
BoostGeometryWriteExpectedFailures(for_double, for_double, for_double);
}
#endif

View File

@@ -260,11 +260,7 @@ static bool test_overlay_p_q(std::string const& caseid,
{
out << string_from_type<CalculationType>::name();
}
out
#if defined(BOOST_GEOMETRY_USE_RESCALING)
<< "_rescaled"
#endif
<< ".";
out << ".";
filename = out.str();
}

View File

@@ -136,9 +136,6 @@ bool verify(std::string const& caseid, MultiPolygon const& mp, MultiPolygon cons
std::ostringstream out;
out << "rec_pol_buffer_" << geometry_to_crc(mp)
<< "_" << string_from_type<typename bg::coordinate_type<MultiPolygon>::type>::name()
#if defined(BOOST_GEOMETRY_USE_RESCALING)
<< "_rescaled"
#endif
<< ".";
filename = out.str();
}