mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-18 14:12:09 +00:00
[test][intersection][union] Add cases where all points of g1 are the same as some points of g2.
This commit is contained in:
@@ -528,6 +528,22 @@ 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))"
|
||||
};
|
||||
|
||||
static std::string case_103[2] =
|
||||
{
|
||||
// intersection
|
||||
// all points of [1] the same as some points of [0]
|
||||
"POLYGON((0 0,0 1,1 1,1 0,0 0))",
|
||||
"POLYGON((0 0,0 1,1 0,0 0))"
|
||||
};
|
||||
|
||||
static std::string case_104[2] =
|
||||
{
|
||||
// union in hole
|
||||
// all points of [1] the same as some points of [0]
|
||||
"POLYGON((0 0,0 10,10 10,10 0,0 0),(1 1,9 1,9 9,1 9,1 1))",
|
||||
"POLYGON((1 1,1 9,9 9,9 1,1 1))"
|
||||
};
|
||||
|
||||
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 7,2 8,2 9,2 10,2 11,2 12,1 14"
|
||||
|
||||
@@ -339,6 +339,13 @@ void test_areal()
|
||||
case_102[0], case_102[1],
|
||||
0, -1, 3.1875);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("case_103",
|
||||
case_103[0], case_103[1],
|
||||
1, -1, 0.5);
|
||||
test_one<Polygon, Polygon, Polygon>("case_104",
|
||||
case_104[0], case_104[1],
|
||||
0, -1, 0.0);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("mysql_21964049",
|
||||
mysql_21964049[0], mysql_21964049[1],
|
||||
0, -1, 0.0);
|
||||
|
||||
@@ -237,6 +237,13 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("102",
|
||||
case_102[0], case_102[1], 1, 1, 17, 8.75);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("103",
|
||||
case_103[0], case_103[1],
|
||||
1, 0, 5, 1.0);
|
||||
test_one<Polygon, Polygon, Polygon>("104",
|
||||
case_104[0], case_104[1],
|
||||
1, 0, 5, 100.0);
|
||||
|
||||
/*
|
||||
test_one<Polygon, Polygon, Polygon>(102,
|
||||
simplex_normal[0], simplex_reversed[1],
|
||||
|
||||
Reference in New Issue
Block a user