[geometry] Unit tests belonging to bugfix difference problem reported by H2 at Boost.Geometry list at 2012-09-14 and 2012-10-11

[SVN r80994]
This commit is contained in:
Barend Gehrels 2012-10-15 21:15:00 +00:00
parent 931d6b65bf
commit a9d243b636
4 changed files with 29 additions and 1 deletions

View File

@ -10,7 +10,7 @@
#include <iostream>
#include <string>
// #define BOOST_GEOMETRY_DEBUG_ASSEMBLE
// #define BOOST_GEOMETRY_DEBUG_ASSEMBLE
//#define BOOST_GEOMETRY_CHECK_WITH_SQLSERVER
//#define BOOST_GEOMETRY_DEBUG_SEGMENT_IDENTIFIER
@ -122,6 +122,13 @@ void test_areal()
ggl_list_20111025_vd_2[0], ggl_list_20111025_vd_2[1],
1, -999, 10.0, 2, -999, 6.0);
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
2, -999, 17.0, 0, -999, 0.0);
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
2, -999, 17.0, 0, -999, 0.0);
/* TODO: fix
test_one<Polygon, MultiPolygon, MultiPolygon>("case_101_multi",

View File

@ -100,6 +100,13 @@ void test_areal()
test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_4",
case_recursive_boxes_4[0], case_recursive_boxes_4[1],
13, 157, 67.0); // Area from SQL Server
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
2, 10, 6.0); // Area from SQL Server
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
2, 10, 6.0); // Area from SQL Server
}
template <typename Polygon, typename MultiPolygon, typename Box>

View File

@ -106,6 +106,13 @@ void test_areal()
test_one<Polygon, MultiPolygon, MultiPolygon>("case_recursive_boxes_3",
case_recursive_boxes_3[0], case_recursive_boxes_3[1],
17, 0, 159, 56.5); // Area from SQL Server
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_a",
ggl_list_20120915_h2[0], ggl_list_20120915_h2[1],
1, 0, 12, 23.0); // Area from SQL Server
test_one<Polygon, MultiPolygon, MultiPolygon>("ggl_list_20120915_h2_b",
ggl_list_20120915_h2[0], ggl_list_20120915_h2[2],
1, 0, 12, 23.0); // Area from SQL Server
}
template <typename P>

View File

@ -426,6 +426,13 @@ static std::string ggl_list_20111025_vd_2[2] =
"MULTIPOLYGON(((0 0,0 2,2 2,2 0,0 0)),((4 0,4 2,6 2,6 0,4 0)))"
};
// Mail of h2 indicating that reversed order (in second polygon) has ix/ix problems
static std::string ggl_list_20120915_h2[3] =
{
"MULTIPOLYGON(((-2 5, -1 5, 0 5, 2 5, 2 -2, 1 -2, 1 -1, 0 -1,0 0, -1 0, -2 0, -2 5)))",
"MULTIPOLYGON(((0 0, 1 0, 1 -1, 0 -1, 0 0)), ((-1 5, 0 5, 0 0, -1 0, -1 5)))",
"MULTIPOLYGON(((-1 5, 0 5, 0 0, -1 0, -1 5)), ((0 0, 1 0, 1 -1, 0 -1, 0 0)))"
};
#endif // BOOST_GEOMETRY_TEST_MULTI_OVERLAY_CASES_HPP