[test][point_on_surface] Add test for point_on_surface using integer coordinates.

This commit is contained in:
Matt Amos
2014-10-13 00:32:19 +01:00
parent 434baaa510
commit 85fec8faa9

View File

@@ -125,6 +125,17 @@ void test_geometry(std::string const& case_id, std::string const& wkt, double ex
}
template <typename Point>
void test_point_type()
{
typedef bg::model::polygon<Point> polygon;
typedef bg::model::polygon<Point, true, false> cw_open_polygon;
typedef bg::model::polygon<Point, true, true> cw_closed_polygon;
test_geometry<cw_open_polygon>("with_hole_cw_open", "POLYGON((0 0,0 9,9 9,9 0),(2 2,7 2,7 7,2 7))", 0, 0);
test_geometry<cw_closed_polygon>("with_hole_cw_closed", "POLYGON((0 0,0 9,9 9,9 0,0 0),(2 2,7 2,7 7,2 7,2 2))", 0, 0);
}
template <typename Point>
void test_all()
{
@@ -308,6 +319,8 @@ void test_all()
int test_main(int, char* [])
{
test_all<bg::model::d2::point_xy<double> >();
test_point_type<bg::model::d2::point_xy<double> >();
test_point_type<bg::model::d2::point_xy<int> >();
return 0;
}