mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
test: add test cases for issues fixed in next commit
This commit is contained in:
parent
6b76894e11
commit
adc9044da2
@ -157,6 +157,15 @@ static std::string const issue_1019
|
||||
static std::string const issue_1262
|
||||
= "POLYGON((-2.447356204196278639528828 57.21240623671037894837355,34.00960378453005006349485 54.01542955431686721112783,-0.000789642333984375 18.712947845458984375,-41.480987548828125 60.193248748779296875,-3.12519073486328125 57.271846771240234375,-2.447356204196278639528828 57.21240623671037894837355),(-36.24821876005196230607908 57.78889760314127244100746,-0.000785932392148191993896944 21.54137477179954629491476,30.75139677038663066355184 52.2934724874262641947098,-36.24821876005196230607908 57.78889760314127244100746))";
|
||||
|
||||
static std::string const issue_1294_original
|
||||
= "POLYGON((730.35 750,730.35 740,726.02 740,726.02 735,730.35 735,730.35 0,0 0,0 750,730.35 750))";
|
||||
// With 600 subtracted (with 700, the problem does not reproduce)
|
||||
static std::string const issue_1294
|
||||
= "POLYGON((130.35 150,130.35 140,126.02 140,126.02 135,130.35 135,130.35 0,0 0,0 150,130.35 150))";
|
||||
// The dent is 10 lower and then it does not reproduce
|
||||
static std::string const issue_1294_shifted
|
||||
= "POLYGON((130.35 150,130.35 130,126.02 130,126.02 125,130.35 125,130.35 0,0 0,0 150,130.35 150))";
|
||||
|
||||
// CCW Polygons not working in 1.56
|
||||
static std::string const mysql_report_2014_10_24
|
||||
= "POLYGON((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))";
|
||||
@ -620,6 +629,12 @@ void test_all()
|
||||
test_one<polygon_type, polygon_type>("issue_1262_3", issue_1262, join_round4, end_round4, 193.47288, -0.4);
|
||||
}
|
||||
|
||||
{
|
||||
test_one<polygon_type, polygon_type>("issue_1294", issue_1294, join_miter, end_flat, 22456.0, 5.0);
|
||||
test_one<polygon_type, polygon_type>("issue_1294_shifted", issue_1294_shifted, join_miter, end_flat, 22456.0, 5.0);
|
||||
test_one<polygon_type, polygon_type>("issue_1294_original", issue_1294_original, join_miter, end_flat, 562666.0, 5.0);
|
||||
}
|
||||
|
||||
{
|
||||
bg::strategy::buffer::join_round join_round32(32);
|
||||
bg::strategy::buffer::end_round end_round32(32);
|
||||
|
@ -1195,6 +1195,18 @@ static std::string issue_1244[2] =
|
||||
"POLYGON((2 -1,5 2,2 5,2 -1))"
|
||||
};
|
||||
|
||||
static std::string issue_1293[2] =
|
||||
{
|
||||
"POLYGON((13.90250403054817 -108.7493905903629, 18.1717071533203 -109.6161492466927, 20.38385009765624 -109.6161492466927, 13.74227594050434 -109.9162293522026, 13.80791011645497 -109.3242516085326, 13.90250403054817 -108.7493905903629))",
|
||||
"POLYGON((18.17170715332031 -109.6161492466927, 19.60749526774088 -109.5220427274138, 11.19696044921875 -108.1424287761621, 12.48744269320276 -108.7788241542253, 13.84995095309101 -109.2413333582132, 15.26117233479817 -109.5220427274138, 16.69696044921874 -109.6161492466927, 18.17170715332031 -109.6161492466927))"
|
||||
};
|
||||
|
||||
static std::string issue_1295[2] =
|
||||
{
|
||||
"POLYGON((6.006524919981425 -1.8204168107748433, -1.7115898840974395 -1.8204168107748442, -2.1474675179419931 1.8204168107748429, -0.21793881692227707 1.8204168107748435, 0.0 0.0, 5.7885861030591492 4.6030847803960675e-16, 6.006524919981425 -1.8204168107748433))",
|
||||
"POLYGON((5.7885861030591501 1.2258588412299519e-16, 4.9808473496052885 -0.91020845951432006, 3.0646473238074286e-16 -0.91020843804041685, 0.0 0.0, 5.7885861030591501 1.2258588412299519e-16))"
|
||||
};
|
||||
|
||||
static std::string ggl_list_20120229_volker[3] =
|
||||
{
|
||||
"POLYGON((1716 1554,2076 2250,2436 2352,2796 1248,3156 2484,3516 2688,3516 2688,3156 2484,2796 1248,2436 2352,2076 2250, 1716 1554))",
|
||||
|
@ -617,6 +617,15 @@ void test_all()
|
||||
|
||||
TEST_DIFFERENCE(issue_1244, 3, 8, 3, 2, 6);
|
||||
|
||||
TEST_DIFFERENCE(issue_1293, 1, 1.40999, 1, 2.318951, 2);
|
||||
|
||||
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
|
||||
// Difference fails for this case. This was not reported for this case.
|
||||
// Reported as a failing intersection, which is fixed.
|
||||
// The failing difference should be investigated more thoroughly.
|
||||
TEST_DIFFERENCE(issue_1295, 1, 9.999, 1, 9.999, 1);
|
||||
#endif
|
||||
|
||||
TEST_DIFFERENCE(mysql_21977775, 2, 160.856568913, 2, 92.3565689126, 4);
|
||||
TEST_DIFFERENCE(mysql_21965285, 1, 92.0, 1, 14.0, 1);
|
||||
TEST_DIFFERENCE(mysql_23023665_1, 1, 92.0, 1, 142.5, 2);
|
||||
|
@ -307,6 +307,9 @@ void test_areal()
|
||||
|
||||
TEST_INTERSECTION(issue_1244, 1, -1, 7);
|
||||
|
||||
TEST_INTERSECTION(issue_1293, 1, -1, 1.49123);
|
||||
TEST_INTERSECTION(issue_1295, 1, -1, 4.90121);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_mp1", buffer_mp1[0], buffer_mp1[1],
|
||||
1, 31, 2.271707796);
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_mp2", buffer_mp2[0], buffer_mp2[1],
|
||||
|
@ -475,6 +475,12 @@ void test_areal()
|
||||
TEST_UNION(issue_1244, 1, 1, -1, 17);
|
||||
TEST_UNION_REV(issue_1244, 1, 1, -1, 17);
|
||||
|
||||
TEST_UNION(issue_1293, 1, 0, -1, 5.22017);
|
||||
TEST_UNION_REV(issue_1293, 1, 0, -1, 5.22017);
|
||||
|
||||
TEST_UNION(issue_1295, 1, 0, -1, 17.56273);
|
||||
TEST_UNION_REV(issue_1295, 1, 0, -1, 17.56273);
|
||||
|
||||
TEST_UNION(geos_1, 1, 0, -1, expectation_limits(3458.0, 3461.3203125));
|
||||
TEST_UNION(geos_2, 1, 0, -1, expectation_limits(349.0625, 350.55102539));
|
||||
TEST_UNION(geos_3, 1, 0, -1, 29391548.4998779);
|
||||
|
Loading…
x
Reference in New Issue
Block a user