Remove redundant BOOST_VERSION #if/endif

This commit is contained in:
Artem Pavlenko 2022-11-04 14:07:28 +00:00
parent 7e5655eef4
commit 2a71903c75
2 changed files with 4 additions and 14 deletions

View file

@ -71,19 +71,14 @@ TEST_CASE("geometry formats")
mapnik::wkbSpatiaLite);
// winding order is not correct per OGC so we'll fix it
mapnik::geometry::correct(geom);
#if BOOST_VERSION >= 105800
REQUIRE(mapnik::geometry::is_valid(geom));
REQUIRE(mapnik::geometry::is_simple(geom));
#endif
geom = mapnik::geometry_utils::from_wkb((const char*)sp_valid_blob,
sizeof(sp_valid_blob) / sizeof(sp_valid_blob[0]),
mapnik::wkbAuto);
mapnik::geometry::correct(geom);
#if BOOST_VERSION >= 105800
REQUIRE(mapnik::geometry::is_valid(geom));
REQUIRE(mapnik::geometry::is_simple(geom));
#endif
geom = mapnik::geometry_utils::from_wkb((const char*)sp_invalid_blob,
sizeof(sp_invalid_blob) / sizeof(sp_invalid_blob[0]),
@ -95,26 +90,23 @@ TEST_CASE("geometry formats")
geom = mapnik::geometry_utils::from_wkb((const char*)sq_valid_blob,
sizeof(sq_valid_blob) / sizeof(sq_valid_blob[0]),
mapnik::wkbGeneric);
#if BOOST_VERSION >= 105800
REQUIRE(mapnik::geometry::is_valid(geom));
REQUIRE(mapnik::geometry::is_simple(geom));
#endif
geom = mapnik::geometry_utils::from_wkb((const char*)sq_valid_blob,
sizeof(sq_valid_blob) / sizeof(sq_valid_blob[0]),
mapnik::wkbAuto);
#if BOOST_VERSION >= 105800
REQUIRE(mapnik::geometry::is_valid(geom));
REQUIRE(mapnik::geometry::is_simple(geom));
#endif
geom = mapnik::geometry_utils::from_wkb((const char*)sq_invalid_blob,
sizeof(sq_invalid_blob) / sizeof(sq_invalid_blob[0]),
mapnik::wkbGeneric);
REQUIRE(geom.is<mapnik::geometry::geometry_empty>()); // returns geometry_empty
} catch (std::exception const& ex)
}
catch (std::exception const& ex)
{
REQUIRE(false);
std::clog << "threw: " << ex.what() << "\n";

View file

@ -16,7 +16,7 @@
#include <vector>
#include <fstream>
#if BOOST_VERSION >= 105800
namespace {
struct spatially_equal_visitor
@ -97,7 +97,7 @@ bool spatially_equal(mapnik::geometry::geometry<T> const& g0, mapnik::geometry::
}
} // namespace
#endif
TEST_CASE("Well-known-geometries")
{
@ -131,9 +131,7 @@ TEST_CASE("Well-known-geometries")
REQUIRE(wkt0 == wkt1);
REQUIRE(wkt0 == wkt); // WKT round-trip
// compare spatially (NOTE: GeometryCollection comparison also enforces strict order)
#if BOOST_VERSION >= 105800
REQUIRE(spatially_equal(geom_0, geom_1));
#endif
}
// compare WKTS as ints