unit tests - don't run projection transformations tests which require libproj when MAPNIK_USE_PROJ4 is not set

This commit is contained in:
Artem Pavlenko 2021-03-11 09:58:24 +00:00
parent 692907761a
commit 256ee86104
3 changed files with 8 additions and 3 deletions

View file

@ -1185,6 +1185,7 @@ SECTION("test_projection_4326_3857 - Geometry Collection Variant Object") {
}
} // END SECTION
#ifdef MAPNIK_USE_PROJ4
SECTION("test_projection_4269_3857 - Line_String Geometry Object") {
using namespace mapnik::geometry;
mapnik::projection source("+init=epsg:4269");
@ -1250,6 +1251,7 @@ SECTION("test_projection_4269_3857 - Line_String Geometry Object") {
}
} // End Section
SECTION("test_projection_4269_3857 - Point Geometry Object") {
using namespace mapnik::geometry;
mapnik::projection source("+init=epsg:4269");
@ -1303,5 +1305,6 @@ SECTION("test_projection_4269_3857 - Point Geometry Object") {
}
} // End Section
#endif // MAPNIK_USE_PROJ4
} // End Testcase

View file

@ -120,8 +120,6 @@ SECTION("test pj_transform failure behavior")
proj1 = nullptr;
}
#endif
// Github Issue https://github.com/mapnik/mapnik/issues/2648
SECTION("Test proj antimeridian bbox")
{
@ -205,12 +203,12 @@ SECTION("Test proj antimeridian bbox")
}
}
}
#endif
SECTION("proj_transform of coordinate arrays with stride > 1")
{
mapnik::projection const proj_4326("+init=epsg:4326");
mapnik::projection const proj_3857("+init=epsg:3857");
mapnik::projection const proj_2193("+init=epsg:2193");
SECTION("lonlat <-> Web Mercator")
{
@ -245,6 +243,7 @@ SECTION("proj_transform of coordinate arrays with stride > 1")
#ifdef MAPNIK_USE_PROJ4
SECTION("lonlat <-> New Zealand Transverse Mercator 2000")
{
mapnik::projection const proj_2193("+init=epsg:2193");
// cs2cs -Ef %.10f +init=epsg:4326 +to +init=epsg:2193 <<END
// 170.142139 -43.595056
// 175.566667 -39.283333

View file

@ -8,8 +8,10 @@
#include <mapnik/proj_transform.hpp>
#include <mapnik/projection.hpp>
TEST_CASE("transform_path_adapter") {
#ifdef MAPNIK_USE_PROJ4
SECTION("polygon closing - epsg 2330") {
mapnik::geometry::polygon<double> g;
g.emplace_back();
@ -114,4 +116,5 @@ SECTION("polygon closing - epsg 32633") {
CHECK( y == 0 );
}
#endif MAPNIK_USE_PROJ4
}