mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
[test] Harmonize define (four variants were used).
If defined, just ignore test_validity flag (such that validity is always checked), same for sym_difference
This commit is contained in:
parent
59c795a967
commit
7f23fcea98
@ -187,7 +187,7 @@ void test_all()
|
||||
// Having flat end
|
||||
test_one<linestring, polygon>("for_collinear", for_collinear, join_round, end_flat, 68.561, 2.0);
|
||||
test_one<linestring, polygon>("for_collinear", for_collinear, join_miter, end_flat, 72, 2.0);
|
||||
#if defined(BOOST_GEOMETRY_BUFFER_INCLUDE_FAILING_TESTS)
|
||||
#if defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
test_one<linestring, polygon>("for_collinear2", for_collinear2, join_round, end_flat, 74.387, 2.0, 2.0);
|
||||
test_one<linestring, polygon>("for_collinear2", for_collinear2, join_miter, end_flat, 78.0, 2.0, 2.0);
|
||||
#endif
|
||||
@ -245,10 +245,8 @@ void test_all()
|
||||
test_one<linestring, polygon>("mysql_report_2015_03_02c_asym1", mysql_report_2015_03_02c, join_round(7), end_round(7), 39.714, d10, ut_settings(), d15);
|
||||
test_one<linestring, polygon>("mysql_report_2015_03_02c_asym2", mysql_report_2015_03_02c, join_round(7), end_round(7), 46.116, d15, ut_settings(), d10);
|
||||
|
||||
#if defined(BOOST_GEOMETRY_BUFFER_USE_SIDE_OF_INTERSECTION)
|
||||
double const d100 = 10;
|
||||
test_one<linestring, polygon>("mysql_report_2015_04_01", mysql_report_2015_04_01, join_round(32), end_round(32), 632.234, d100);
|
||||
#endif
|
||||
}
|
||||
|
||||
{
|
||||
@ -288,7 +286,7 @@ void test_all()
|
||||
27862.733459829971,
|
||||
5.9518403867035365);
|
||||
|
||||
#if defined(BOOST_GEOMETRY_BUFFER_INCLUDE_FAILING_TESTS)
|
||||
#if defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
test_one<linestring, polygon>("mysql_report_2015_09_08a", mysql_report_2015_09_08a, join_round32, end_round32, 0.0, 1.0);
|
||||
test_one<linestring, polygon>("mysql_report_2015_09_08b", mysql_report_2015_09_08b, join_round32, end_round32, 0.0, 1099511627778.0);
|
||||
test_one<linestring, polygon>("mysql_report_2015_09_08c", mysql_report_2015_09_08c, join_round32, end_round32, 0.0, 0xbe);
|
||||
@ -316,7 +314,7 @@ void test_all()
|
||||
test_one<linestring, polygon>("mysql_25662426a_5", mysql_25662426a, join_round32, end_flat, 227.8325, 5.0);
|
||||
test_one<linestring, polygon>("mysql_25662426a_10", mysql_25662426a, join_round32, end_flat, 534.1084, 10.0);
|
||||
|
||||
#if defined(BOOST_GEOMETRY_BUFFER_INCLUDE_FAILING_TESTS)
|
||||
#if defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
// Left
|
||||
test_one<linestring, polygon>("mysql_25662426a_1", mysql_25662426a, join_round32, end_round32, 54.9018, 1.0, ut_settings(), 0.0);
|
||||
test_one<linestring, polygon>("mysql_25662426a_2", mysql_25662426a, join_round32, end_round32, 103.6072, 2.0, ut_settings(), 0.0);
|
||||
|
@ -545,7 +545,7 @@ void test_all()
|
||||
|
||||
test_one<polygon_type, polygon_type>("ticket_10412", ticket_10412, join_miter, end_flat, 3109.6616, 1.5, settings);
|
||||
test_one<polygon_type, polygon_type>("ticket_11580_100", ticket_11580, join_miter, end_flat, 52.0221000, 1.00, settings);
|
||||
#ifdef BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS
|
||||
#if defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
// Larger distance, resulting in only one circle
|
||||
test_one<polygon_type, polygon_type>("ticket_11580_237", ticket_11580, join_miter, end_flat, 999.999, 2.37, settings);
|
||||
#endif
|
||||
|
@ -329,9 +329,14 @@ void test_buffer(std::string const& caseid,
|
||||
);
|
||||
}
|
||||
|
||||
if (settings.test_validity && ! bg::is_valid(buffered))
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
if (settings.test_validity)
|
||||
#endif
|
||||
{
|
||||
BOOST_CHECK_MESSAGE(bg::is_valid(buffered), complete.str() << " is not valid");
|
||||
if (! bg::is_valid(buffered))
|
||||
{
|
||||
BOOST_CHECK_MESSAGE(bg::is_valid(buffered), complete.str() << " is not valid");
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(TEST_WITH_SVG_PER_TURN)
|
||||
|
@ -56,9 +56,7 @@ void test_all()
|
||||
#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],
|
||||
@ -313,7 +311,7 @@ void test_all()
|
||||
settings);
|
||||
}
|
||||
|
||||
#ifdef BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS
|
||||
#if defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
test_one<polygon, polygon, polygon>("geos_1",
|
||||
geos_1[0], geos_1[1],
|
||||
21, -1, 0.31640625,
|
||||
|
@ -320,7 +320,7 @@ void test_areal()
|
||||
TEST_DIFFERENCE(case_recursive_boxes_59, 8, 6.5, 7, 7.0, 12);
|
||||
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_INCLUDE_FAILING_TESTS)
|
||||
#if defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
// Misses one triangle
|
||||
TEST_DIFFERENCE(case_recursive_boxes_62, 5, 5.0, 11, 5.75, 12);
|
||||
#endif
|
||||
@ -401,12 +401,9 @@ void test_specific_areal()
|
||||
{
|
||||
{
|
||||
// Spikes in a-b and b-a, failure in symmetric difference
|
||||
|
||||
ut_settings settings;
|
||||
#if !defined(BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS)
|
||||
settings.sym_difference = false;
|
||||
settings.test_validity = false;
|
||||
#endif
|
||||
|
||||
TEST_DIFFERENCE_WITH(0, 1, ticket_11674, 3, 9105781.5, 5, 119059.5, -1);
|
||||
}
|
||||
|
@ -191,7 +191,9 @@ std::string test_difference(std::string const& caseid, G1 const& g1, G2 const& g
|
||||
? bg::num_points(result) : 0;
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
if (settings.test_validity)
|
||||
#endif
|
||||
{
|
||||
// std::cout << bg::dsv(result) << std::endl;
|
||||
std::string message;
|
||||
@ -340,7 +342,9 @@ std::string test_one(std::string const& caseid,
|
||||
expected_count2, expected_rings_count2, expected_point_count2,
|
||||
expected_area2, false, settings);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
if (settings.sym_difference)
|
||||
#endif
|
||||
{
|
||||
test_difference<OutputType>(caseid + "_s", g1, g2,
|
||||
expected_count_s,
|
||||
|
@ -913,7 +913,7 @@ int test_main(int, char* [])
|
||||
|
||||
test_boxes_nd<double>();
|
||||
|
||||
#ifdef BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS
|
||||
#if defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
// ticket #10868 still fails for 32-bit integers
|
||||
test_ticket_10868<int32_t>("MULTIPOLYGON(((33520458 6878575,33480192 14931538,31446819 18947953,30772384 19615678,30101303 19612322,30114725 16928001,33520458 6878575)))");
|
||||
|
||||
|
@ -135,7 +135,7 @@ void test_areal()
|
||||
case_107_multi[1], case_107_multi[2],
|
||||
3, 13, 3.0);
|
||||
|
||||
#ifdef BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS
|
||||
#if defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
{
|
||||
ut_settings ignore_validity; ignore_validity.test_validity = false;
|
||||
|
||||
|
@ -105,7 +105,9 @@ check_result(
|
||||
}
|
||||
}
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
if (settings.test_validity)
|
||||
#endif
|
||||
{
|
||||
std::string message;
|
||||
bool const valid = check_validity<ResultType>::apply(intersection_output, message);
|
||||
|
@ -125,7 +125,9 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING)
|
||||
if (settings.test_validity)
|
||||
#endif
|
||||
{
|
||||
std::string message;
|
||||
bool const valid = check_validity<result_type>::apply(clip, message);
|
||||
|
@ -405,7 +405,7 @@ void test_areal()
|
||||
ticket_12118[0], ticket_12118[1],
|
||||
1, 1, 27, 2221.38713);
|
||||
|
||||
#if defined(BOOST_GEOMETRY_ENABLE_FAILING_TESTS) || ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
#if defined(BOOST_GEOMETRY_TEST_ENABLE_FAILING) || ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// No output if rescaling is done
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_12125",
|
||||
ticket_12125[0], ticket_12125[1],
|
||||
|
Loading…
x
Reference in New Issue
Block a user