mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-12 14:01:47 +00:00
[test] Add similar simpler cases to single polygons
This commit is contained in:
parent
07872acca1
commit
5671c065e4
@ -528,6 +528,20 @@ static std::string case_102[2] =
|
|||||||
"POLYGON((3 6,4 5,5 4,3 2,1 4,3 6),(4 5,3 4,3.5 3.5,4 4,4 5))"
|
"POLYGON((3 6,4 5,5 4,3 2,1 4,3 6),(4 5,3 4,3.5 3.5,4 4,4 5))"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const std::string case_103[2] =
|
||||||
|
{
|
||||||
|
// Smaller adapted version of case_126_multi
|
||||||
|
"POLYGON((5 5,5 10,10 10,10 5,5 5),(9 8,7 9,5 8,7 7,9 8))",
|
||||||
|
"POLYGON((0 3,6 3,6 9,0 9,0 3))"
|
||||||
|
};
|
||||||
|
|
||||||
|
static const std::string case_104[2] =
|
||||||
|
{
|
||||||
|
// Same but with hole in second polygon too
|
||||||
|
case_103[0],
|
||||||
|
"POLYGON((0 3,6 3,6 9,0 9,0 3),(2 6,4 7,6 6,4 5,2 6))"
|
||||||
|
};
|
||||||
|
|
||||||
static std::string case_many_situations[2] = {
|
static std::string case_many_situations[2] = {
|
||||||
"POLYGON((2 6,2 14,10 18,18 14,18 6,16 5,14 4,12 3,10 2,8 3,6 4,4 5,2 6))",
|
"POLYGON((2 6,2 14,10 18,18 14,18 6,16 5,14 4,12 3,10 2,8 3,6 4,4 5,2 6))",
|
||||||
"POLYGON((2 6,2 7,2 8,2 9,2 10,2 11,2 12,1 14"
|
"POLYGON((2 6,2 7,2 8,2 9,2 10,2 11,2 12,1 14"
|
||||||
|
@ -42,6 +42,13 @@
|
|||||||
|
|
||||||
BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
|
BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
|
||||||
|
|
||||||
|
#define TEST_INTERSECTION(caseid, clips, points, area) \
|
||||||
|
(test_one<Polygon, Polygon, Polygon>) \
|
||||||
|
( #caseid, caseid[0], caseid[1], clips, points, area)
|
||||||
|
|
||||||
|
#define TEST_INTERSECTION_IGNORE(caseid, clips, points, area) \
|
||||||
|
(test_one<Polygon, Polygon, Polygon>) \
|
||||||
|
( #caseid, caseid[0], caseid[1], clips, points, area, ignore_validity)
|
||||||
|
|
||||||
template <typename Polygon>
|
template <typename Polygon>
|
||||||
void test_areal()
|
void test_areal()
|
||||||
@ -339,6 +346,9 @@ void test_areal()
|
|||||||
case_102[0], case_102[1],
|
case_102[0], case_102[1],
|
||||||
0, -1, 3.1875);
|
0, -1, 3.1875);
|
||||||
|
|
||||||
|
TEST_INTERSECTION_IGNORE(case_103, 0, -1, 3.5);
|
||||||
|
TEST_INTERSECTION_IGNORE(case_104, 0, -1, 3.0);
|
||||||
|
|
||||||
test_one<Polygon, Polygon, Polygon>("mysql_21964049",
|
test_one<Polygon, Polygon, Polygon>("mysql_21964049",
|
||||||
mysql_21964049[0], mysql_21964049[1],
|
mysql_21964049[0], mysql_21964049[1],
|
||||||
0, -1, 0.0);
|
0, -1, 0.0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user