mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-01 20:42:10 +00:00
[test] remove overload with percentage, only used once and now
supported by ut_settings
This commit is contained in:
@@ -210,7 +210,7 @@ void test_one(std::string const& caseid,
|
||||
std::string const& wkt1, std::string const& wkt2,
|
||||
int expected_count, int expected_hole_count,
|
||||
int expected_point_count, double expected_area,
|
||||
ut_settings const& settings)
|
||||
ut_settings const& settings = ut_settings())
|
||||
{
|
||||
G1 g1;
|
||||
bg::read_wkt(wkt1, g1);
|
||||
@@ -218,7 +218,7 @@ void test_one(std::string const& caseid,
|
||||
G2 g2;
|
||||
bg::read_wkt(wkt2, g2);
|
||||
|
||||
// Reverse if necessary
|
||||
// Reverse/close if necessary (e.g. G1/G2 are ccw and/or open)
|
||||
bg::correct(g1);
|
||||
bg::correct(g2);
|
||||
|
||||
@@ -227,20 +227,4 @@ void test_one(std::string const& caseid,
|
||||
expected_area, settings);
|
||||
}
|
||||
|
||||
template <typename OutputType, typename G1, typename G2>
|
||||
void test_one(std::string const& caseid,
|
||||
std::string const& wkt1, std::string const& wkt2,
|
||||
int expected_count, int expected_hole_count,
|
||||
int expected_point_count, double expected_area,
|
||||
double percentage = 0.001)
|
||||
{
|
||||
ut_settings settings;
|
||||
settings.percentage = percentage;
|
||||
|
||||
test_one<OutputType, G1, G2>(caseid, wkt1, wkt2,
|
||||
expected_count, expected_hole_count, expected_point_count,
|
||||
expected_area, settings);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -247,16 +247,20 @@ void test_areal()
|
||||
67.3550722317627);
|
||||
#endif
|
||||
|
||||
{
|
||||
ut_settings settings;
|
||||
settings.percentage = 0.1;
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("isovist",
|
||||
isovist1[0], isovist1[1],
|
||||
1,
|
||||
0,
|
||||
-1,
|
||||
313.36036462, 0.1);
|
||||
test_one<Polygon, Polygon, Polygon>("isovist",
|
||||
isovist1[0], isovist1[1],
|
||||
1,
|
||||
0,
|
||||
-1,
|
||||
313.36036462, settings);
|
||||
|
||||
// SQL Server gives: 313.360374193241
|
||||
// PostGIS gives: 313.360364623393
|
||||
// SQL Server gives: 313.360374193241
|
||||
// PostGIS gives: 313.360364623393
|
||||
}
|
||||
|
||||
// Ticket 5103 https://svn.boost.org/trac/boost/ticket/5103
|
||||
// This ticket was actually reported for Boost.Polygon
|
||||
@@ -266,10 +270,13 @@ void test_areal()
|
||||
// Boost.Geometry gives: 2515271327070.5237746891 (ttmath)
|
||||
// 2515271327070.5156 (double)
|
||||
// 2515271320603.0000 (int)
|
||||
// Note the int-test was tested outside of this unit test. It is in two points 0.37 off (logical for an int).
|
||||
// Because of the width of the polygon (400000 meter) this causes a substantial difference.
|
||||
// Note the int-test was tested outside of this unit test.
|
||||
// It is in two points 0.37 off (logical for an int).
|
||||
// Because of the width of the polygon (400000 meter)
|
||||
// this causes a substantial difference.
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("ticket_5103", ticket_5103[0], ticket_5103[1],
|
||||
test_one<Polygon, Polygon, Polygon>("ticket_5103",
|
||||
ticket_5103[0], ticket_5103[1],
|
||||
1, 0, 25, 2515271327070.5);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("ticket_8310a", ticket_8310a[0], ticket_8310a[1],
|
||||
|
||||
Reference in New Issue
Block a user