aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2019-02-15 15:41:06 +0100
committerGitHub <noreply@github.com>2019-02-15 15:41:06 +0100
commit7df282be9512b5a62aac08697e046fe9d459c8ad (patch)
tree6774870a9d1d895aa9766cef1f2f1708731cedcb
parenta813ad65cfb819bfa295dfbacdf577b258377c93 (diff)
parentac5231f44aab2391bac0ce3b77e9ed27357d59a9 (diff)
downloadPROJ-7df282be9512b5a62aac08697e046fe9d459c8ad.tar.gz
PROJ-7df282be9512b5a62aac08697e046fe9d459c8ad.zip
Merge pull request #1265 from dg0yt/gtest-mingw
Fix issues with Gtest and MinGW
-rw-r--r--test/googletest/CMakeLists.txt.in4
-rw-r--r--test/unit/CMakeLists.txt26
-rw-r--r--test/unit/gie_self_tests.cpp4
-rw-r--r--test/unit/pj_transform_test.cpp4
-rw-r--r--test/unit/test_common.cpp8
-rw-r--r--test/unit/test_crs.cpp150
-rw-r--r--test/unit/test_datum.cpp2
-rw-r--r--test/unit/test_factory.cpp178
-rw-r--r--test/unit/test_io.cpp106
-rw-r--r--test/unit/test_operation.cpp100
10 files changed, 290 insertions, 292 deletions
diff --git a/test/googletest/CMakeLists.txt.in b/test/googletest/CMakeLists.txt.in
index 38f90ca5..dbe3effe 100644
--- a/test/googletest/CMakeLists.txt.in
+++ b/test/googletest/CMakeLists.txt.in
@@ -5,8 +5,8 @@ project(googletest-download NONE)
include(ExternalProject)
ExternalProject_Add(googletest
- URL https://github.com/google/googletest/archive/release-1.8.0.zip
- URL_HASH SHA1=667f873ab7a4d246062565fad32fb6d8e203ee73
+ URL https://github.com/google/googletest/archive/release-1.8.1.zip
+ URL_HASH SHA1=7b41ea3682937069e3ce32cb06619fead505795e
DOWNLOAD_NO_PROGRESS ON
SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt
index 86e3484a..58638fa4 100644
--- a/test/unit/CMakeLists.txt
+++ b/test/unit/CMakeLists.txt
@@ -5,7 +5,7 @@ option(USE_EXTERNAL_GTEST "Compile against external GTest" OFF)
if (USE_EXTERNAL_GTEST)
message(STATUS "Using external GTest")
-find_package(GTest 1.8.0)
+find_package(GTest 1.8.1 CONFIG REQUIRED)
else (USE_EXTERNAL_GTEST)
@@ -42,15 +42,10 @@ endif()
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
# Add googletest directly to our build. This defines
# the gtest and gtest_main targets.
+option(INSTALL_GTEST "Enable installation of googletest" OFF)
add_subdirectory(${CMAKE_BINARY_DIR}/googletest-src
${CMAKE_BINARY_DIR}/googletest-build
EXCLUDE_FROM_ALL)
-# The gtest/gtest_main targets carry header search path
-# dependencies automatically when using CMake 2.8.11 or
-# later. Otherwise we have to add them here ourselves.
-if (CMAKE_VERSION VERSION_LESS 2.8.11)
- include_directories("${gtest_SOURCE_DIR}/include")
-endif()
# FIXME: Deal with our old-school CMakeLists.txt behaving badly
set(CMAKE_C_FLAGS "${_save_c_flags}")
@@ -58,6 +53,9 @@ set(CMAKE_CXX_FLAGS "${_save_cxx_flags}")
unset(_save_c_flags)
unset(_save_cxx_flags)
+# Provide the same target name as find_package(GTest)
+add_library(GTest::gtest ALIAS gtest)
+
endif(USE_EXTERNAL_GTEST)
#
@@ -75,7 +73,7 @@ add_executable(proj_pj_transform_test
main.cpp
pj_transform_test.cpp)
target_link_libraries(proj_pj_transform_test
- gtest
+ GTest::gtest
${PROJ_LIBRARIES})
add_test(NAME proj_pj_transform_test COMMAND proj_pj_transform_test)
@@ -83,7 +81,7 @@ add_executable(proj_errno_string_test
main.cpp
proj_errno_string_test.cpp)
target_link_libraries(proj_errno_string_test
- gtest
+ GTest::gtest
${PROJ_LIBRARIES})
add_test(NAME proj_errno_string_test COMMAND proj_errno_string_test)
@@ -91,7 +89,7 @@ add_executable(proj_angular_io_test
main.cpp
proj_angular_io_test.cpp)
target_link_libraries(proj_angular_io_test
- gtest
+ GTest::gtest
${PROJ_LIBRARIES})
add_test(NAME proj_angular_io_test COMMAND proj_angular_io_test)
@@ -99,7 +97,7 @@ add_executable(proj_context_test
main.cpp
proj_context_test.cpp)
target_link_libraries(proj_context_test
- gtest
+ GTest::gtest
${PROJ_LIBRARIES})
add_test(NAME proj_context_test COMMAND proj_context_test)
@@ -110,7 +108,7 @@ add_executable(pj_phi2_test
main.cpp
pj_phi2_test.cpp)
target_link_libraries(pj_phi2_test
- gtest
+ GTest::gtest
${PROJ_LIBRARIES})
add_test(NAME pj_phi2_test COMMAND pj_phi2_test)
endif()
@@ -127,7 +125,7 @@ add_executable(proj_test_cpp_api
test_factory.cpp
test_c_api.cpp)
target_link_libraries(proj_test_cpp_api
- gtest
+ GTest::gtest
${PROJ_LIBRARIES}
${SQLITE3_LIBRARY})
add_test(NAME proj_test_cpp_api COMMAND proj_test_cpp_api)
@@ -136,6 +134,6 @@ add_executable(gie_self_tests
main.cpp
gie_self_tests.cpp)
target_link_libraries(gie_self_tests
- gtest
+ GTest::gtest
${PROJ_LIBRARIES})
add_test(NAME gie_self_tests COMMAND gie_self_tests)
diff --git a/test/unit/gie_self_tests.cpp b/test/unit/gie_self_tests.cpp
index a3cd8eab..7f9f436b 100644
--- a/test/unit/gie_self_tests.cpp
+++ b/test/unit/gie_self_tests.cpp
@@ -181,7 +181,7 @@ TEST(gie, cart_selftest) {
n = proj_trans_generic(P, PJ_FWD, &(obs[0].lpz.lam), sz, 2,
&(obs[0].lpz.phi), sz, 2, &(obs[0].lpz.z), sz, 2, 0,
sz, 0);
- ASSERT_EQ(n, 2);
+ ASSERT_EQ(n, 2U);
ASSERT_EQ(a.lpz.lam, obs[0].lpz.lam);
ASSERT_EQ(a.lpz.phi, obs[0].lpz.phi);
@@ -197,7 +197,7 @@ TEST(gie, cart_selftest) {
t = 33;
n = proj_trans_generic(P, PJ_FWD, &(obs[0].lpz.lam), sz, 2,
&(obs[0].lpz.phi), sz, 2, &h, 0, 1, &t, 0, 1);
- ASSERT_EQ(n, 2);
+ ASSERT_EQ(n, 2U);
ASSERT_EQ(a.lpz.lam, obs[0].lpz.lam);
ASSERT_EQ(a.lpz.phi, obs[0].lpz.phi);
diff --git a/test/unit/pj_transform_test.cpp b/test/unit/pj_transform_test.cpp
index 9d8439ee..b3a061b4 100644
--- a/test/unit/pj_transform_test.cpp
+++ b/test/unit/pj_transform_test.cpp
@@ -590,7 +590,7 @@ TEST(proj_api_h, pj_set_searchpath) {
pj_set_searchpath(1, &path);
{
auto info = proj_info();
- EXPECT_EQ(info.path_count, 1);
+ EXPECT_EQ(info.path_count, 1U);
ASSERT_NE(info.paths, nullptr);
ASSERT_NE(info.paths[0], nullptr);
EXPECT_EQ(std::string(info.paths[0]), path);
@@ -599,7 +599,7 @@ TEST(proj_api_h, pj_set_searchpath) {
pj_set_searchpath(0, nullptr);
{
auto info = proj_info();
- EXPECT_EQ(info.path_count, 0);
+ EXPECT_EQ(info.path_count, 0U);
EXPECT_EQ(info.paths, nullptr);
}
}
diff --git a/test/unit/test_common.cpp b/test/unit/test_common.cpp
index 56fcaa27..a6085e7b 100644
--- a/test/unit/test_common.cpp
+++ b/test/unit/test_common.cpp
@@ -96,9 +96,9 @@ TEST(common, identifiedobject) {
properties.set(IdentifiedObject::DEPRECATED_KEY, true);
auto obj = OperationParameter::create(properties);
EXPECT_EQ(*(obj->name()->description()), "name");
- ASSERT_EQ(obj->identifiers().size(), 1);
+ ASSERT_EQ(obj->identifiers().size(), 1U);
EXPECT_EQ(obj->identifiers()[0]->code(), "identifier_code");
- ASSERT_EQ(obj->aliases().size(), 1);
+ ASSERT_EQ(obj->aliases().size(), 1U);
EXPECT_EQ(obj->aliases()[0]->toString(), "alias");
EXPECT_EQ(obj->remarks(), "remarks");
EXPECT_TRUE(obj->isDeprecated());
@@ -141,7 +141,7 @@ TEST(common, identifiedobject_identifier_array_of_identifier) {
array->add(Identifier::create("identifier_code2"));
properties.set(IdentifiedObject::IDENTIFIERS_KEY, array);
auto obj = OperationParameter::create(properties);
- ASSERT_EQ(obj->identifiers().size(), 2);
+ ASSERT_EQ(obj->identifiers().size(), 2U);
EXPECT_EQ(obj->identifiers()[0]->code(), "identifier_code1");
EXPECT_EQ(obj->identifiers()[1]->code(), "identifier_code2");
}
@@ -164,7 +164,7 @@ TEST(common, identifiedobject_alias_array_of_string) {
properties.set(IdentifiedObject::ALIAS_KEY,
std::vector<std::string>{"alias1", "alias2"});
auto obj = OperationParameter::create(properties);
- ASSERT_EQ(obj->aliases().size(), 2);
+ ASSERT_EQ(obj->aliases().size(), 2U);
EXPECT_EQ(obj->aliases()[0]->toString(), "alias1");
EXPECT_EQ(obj->aliases()[1]->toString(), "alias2");
}
diff --git a/test/unit/test_crs.cpp b/test/unit/test_crs.cpp
index 69cec01b..26bcf621 100644
--- a/test/unit/test_crs.cpp
+++ b/test/unit/test_crs.cpp
@@ -72,13 +72,13 @@ static nn<std::shared_ptr<UnrelatedObject>> createUnrelatedObject() {
TEST(crs, EPSG_4326_get_components) {
auto crs = GeographicCRS::EPSG_4326;
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "4326");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(crs->nameStr(), "WGS 84");
auto datum = crs->datum();
- ASSERT_EQ(datum->identifiers().size(), 1);
+ ASSERT_EQ(datum->identifiers().size(), 1U);
EXPECT_EQ(datum->identifiers()[0]->code(), "6326");
EXPECT_EQ(*(datum->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(datum->nameStr(), "World Geodetic System 1984");
@@ -87,7 +87,7 @@ TEST(crs, EPSG_4326_get_components) {
EXPECT_EQ(ellipsoid->semiMajorAxis().value(), 6378137.0);
EXPECT_EQ(ellipsoid->semiMajorAxis().unit(), UnitOfMeasure::METRE);
EXPECT_EQ(ellipsoid->inverseFlattening()->value(), 298.257223563);
- ASSERT_EQ(ellipsoid->identifiers().size(), 1);
+ ASSERT_EQ(ellipsoid->identifiers().size(), 1U);
EXPECT_EQ(ellipsoid->identifiers()[0]->code(), "7030");
EXPECT_EQ(*(ellipsoid->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(ellipsoid->nameStr(), "WGS 84");
@@ -1160,11 +1160,11 @@ TEST(crs, geodeticcrs_identify_no_db) {
PropertyMap(), GeodeticReferenceFrame::EPSG_6326, nullptr,
CartesianCS::createGeocentric(UnitOfMeasure::METRE))
->identify(nullptr);
- ASSERT_EQ(res.size(), 0);
+ ASSERT_EQ(res.size(), 0U);
}
{
auto res = GeographicCRS::EPSG_4326->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first.get(), GeographicCRS::EPSG_4326.get());
EXPECT_EQ(res.front().second, 100);
}
@@ -1172,7 +1172,7 @@ TEST(crs, geodeticcrs_identify_no_db) {
// Using virtual method
auto res = static_cast<const CRS *>(GeographicCRS::EPSG_4326.get())
->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first.get(), GeographicCRS::EPSG_4326.get());
EXPECT_EQ(res.front().second, 100);
}
@@ -1183,7 +1183,7 @@ TEST(crs, geodeticcrs_identify_no_db) {
GeodeticReferenceFrame::EPSG_6326, nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::DEGREE))
->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first.get(), GeographicCRS::EPSG_4326.get());
EXPECT_EQ(res.front().second, 100);
}
@@ -1194,7 +1194,7 @@ TEST(crs, geodeticcrs_identify_no_db) {
GeodeticReferenceFrame::EPSG_6326, nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::DEGREE))
->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first.get(), GeographicCRS::EPSG_4326.get());
EXPECT_EQ(res.front().second, 90);
}
@@ -1206,7 +1206,7 @@ TEST(crs, geodeticcrs_identify_no_db) {
GeodeticReferenceFrame::EPSG_6326, nullptr,
EllipsoidalCS::createLongitudeLatitude(UnitOfMeasure::DEGREE))
->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first.get(), GeographicCRS::EPSG_4326.get());
EXPECT_EQ(res.front().second, 25);
}
@@ -1223,7 +1223,7 @@ TEST(crs, geodeticcrs_identify_no_db) {
auto crs = nn_dynamic_pointer_cast<GeodeticCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first.get(), GeographicCRS::EPSG_4326.get());
EXPECT_EQ(res.front().second, 100);
}
@@ -1246,7 +1246,7 @@ TEST(crs, geodeticcrs_identify_db) {
optional<std::string>(), PrimeMeridian::GREENWICH),
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::DEGREE))
->identify(nullptr);
- ASSERT_EQ(res.size(), 0);
+ ASSERT_EQ(res.size(), 0U);
}
{
// Identify by datum code
@@ -1255,7 +1255,7 @@ TEST(crs, geodeticcrs_identify_db) {
PropertyMap(), GeodeticReferenceFrame::EPSG_6326, nullptr,
CartesianCS::createGeocentric(UnitOfMeasure::METRE))
->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 4978);
EXPECT_EQ(res.front().second, 70);
}
@@ -1267,7 +1267,7 @@ TEST(crs, geodeticcrs_identify_db) {
GeodeticReferenceFrame::EPSG_6326, nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::DEGREE))
->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 4326);
EXPECT_EQ(res.front().second, 70);
}
@@ -1279,14 +1279,14 @@ TEST(crs, geodeticcrs_identify_db) {
GeodeticReferenceFrame::EPSG_6326, nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::DEGREE))
->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 4326);
EXPECT_EQ(res.front().second, 70);
}
{
// Perfect match, and ID available. Hardcoded case
auto res = GeographicCRS::EPSG_4326->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first.get(), GeographicCRS::EPSG_4326.get());
EXPECT_EQ(res.front().second, 100);
}
@@ -1298,7 +1298,7 @@ TEST(crs, geodeticcrs_identify_db) {
GeodeticReferenceFrame::EPSG_6326, nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::DEGREE))
->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first.get(), GeographicCRS::EPSG_4326.get());
EXPECT_EQ(res.front().second, 100);
}
@@ -1310,14 +1310,14 @@ TEST(crs, geodeticcrs_identify_db) {
GeographicCRS::EPSG_4807->datum(), nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::GRAD))
->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 4807);
EXPECT_EQ(res.front().second, 100);
}
{
// Perfect match, and ID available
auto res = GeographicCRS::EPSG_4807->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 4807);
EXPECT_EQ(res.front().second, 100);
}
@@ -1332,7 +1332,7 @@ TEST(crs, geodeticcrs_identify_db) {
GeographicCRS::EPSG_4807->datum(), nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::GRAD))
->identify(factory);
- ASSERT_EQ(res.size(), 0);
+ ASSERT_EQ(res.size(), 0U);
}
{
// The object has a unreliable ID
@@ -1345,7 +1345,7 @@ TEST(crs, geodeticcrs_identify_db) {
GeographicCRS::EPSG_4807->datum(), nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::GRAD))
->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 4326);
EXPECT_EQ(res.front().second, 25);
}
@@ -1357,7 +1357,7 @@ TEST(crs, geodeticcrs_identify_db) {
GeodeticReferenceFrame::EPSG_6326, nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::DEGREE))
->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 4326);
EXPECT_EQ(res.front().second, 90);
}
@@ -1369,7 +1369,7 @@ TEST(crs, geodeticcrs_identify_db) {
GeodeticReferenceFrame::EPSG_6326, nullptr,
EllipsoidalCS::createLongitudeLatitude(UnitOfMeasure::DEGREE))
->identify(factory);
- ASSERT_EQ(res.size(), 3);
+ ASSERT_EQ(res.size(), 3U);
EXPECT_EQ(res.front().first->getEPSGCode(), 4326);
EXPECT_EQ(res.front().second, 25);
}
@@ -1410,7 +1410,7 @@ TEST(crs, geodeticcrs_identify_db) {
ASSERT_TRUE(crs != nullptr);
auto factoryAll = AuthorityFactory::create(dbContext, std::string());
auto res = crs->identify(factoryAll);
- EXPECT_EQ(res.size(), 5);
+ EXPECT_EQ(res.size(), 5U);
}
{
// Identify by name, without any code
@@ -1456,7 +1456,7 @@ TEST(crs, geodeticcrs_identify_db) {
nullptr,
EllipsoidalCS::createLatitudeLongitude(UnitOfMeasure::DEGREE))
->identify(factory);
- ASSERT_EQ(res.size(), 0);
+ ASSERT_EQ(res.size(), 0U);
}
}
@@ -1802,7 +1802,7 @@ TEST(crs, projectedCRS_identify_no_db) {
Conversion::createUTM(PropertyMap(), 1, true),
CartesianCS::createEastingNorthing(UnitOfMeasure::METRE))
->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 32601);
EXPECT_EQ(res.front().second, 70);
EXPECT_TRUE(res.front().first->isEquivalentTo(
@@ -1821,7 +1821,7 @@ TEST(crs, projectedCRS_identify_no_db) {
Conversion::createUTM(PropertyMap(), 60, false),
CartesianCS::createEastingNorthing(UnitOfMeasure::METRE));
auto res = static_cast<const CRS *>(crs.get())->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 32760);
EXPECT_EQ(res.front().second, 100);
EXPECT_TRUE(res.front().first->isEquivalentTo(
@@ -1839,7 +1839,7 @@ TEST(crs, projectedCRS_identify_no_db) {
Conversion::createUTM(PropertyMap(), 11, true),
CartesianCS::createEastingNorthing(UnitOfMeasure::METRE))
->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 26711);
EXPECT_EQ(res.front().second, 90);
EXPECT_TRUE(res.front().first->isEquivalentTo(
@@ -1855,7 +1855,7 @@ TEST(crs, projectedCRS_identify_no_db) {
Conversion::createUTM(PropertyMap(), 11, true),
CartesianCS::createEastingNorthing(UnitOfMeasure::METRE))
->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 26911);
EXPECT_EQ(res.front().second, 70);
EXPECT_TRUE(res.front().first->isEquivalentTo(
@@ -1871,7 +1871,7 @@ TEST(crs, projectedCRS_identify_no_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(nullptr);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 32631);
EXPECT_EQ(res.front().second, 70);
EXPECT_TRUE(res.front().first->isEquivalentTo(
@@ -1889,7 +1889,7 @@ TEST(crs, projectedCRS_identify_db) {
// Identify by existing code
auto res =
factoryEPSG->createProjectedCRS("2172")->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 2172);
EXPECT_EQ(res.front().second, 100);
}
@@ -1905,7 +1905,7 @@ TEST(crs, projectedCRS_identify_db) {
sourceCRS->baseCRS(), sourceCRS->derivingConversion(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factoryEPSG);
- EXPECT_EQ(res.size(), 0);
+ EXPECT_EQ(res.size(), 0U);
}
{
// Existing code, but not matching content
@@ -1919,7 +1919,7 @@ TEST(crs, projectedCRS_identify_db) {
sourceCRS->baseCRS(), sourceCRS->derivingConversion(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 32631);
EXPECT_EQ(res.front().second, 25);
}
@@ -1932,7 +1932,7 @@ TEST(crs, projectedCRS_identify_db) {
sourceCRS->baseCRS(), sourceCRS->derivingConversion(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 2172);
EXPECT_EQ(res.front().second, 100);
}
@@ -1945,7 +1945,7 @@ TEST(crs, projectedCRS_identify_db) {
sourceCRS->baseCRS(), sourceCRS->derivingConversion(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 2172);
EXPECT_EQ(res.front().second, 90);
}
@@ -1957,7 +1957,7 @@ TEST(crs, projectedCRS_identify_db) {
sourceCRS->baseCRS(), sourceCRS->derivingConversion(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 2172);
EXPECT_EQ(res.front().second, 70);
}
@@ -1970,7 +1970,7 @@ TEST(crs, projectedCRS_identify_db) {
sourceCRS->baseCRS(), sourceCRS->derivingConversion(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 2172);
EXPECT_EQ(res.front().second, 25);
}
@@ -1985,7 +1985,7 @@ TEST(crs, projectedCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 3375);
EXPECT_EQ(res.front().second, 70);
}
@@ -1999,7 +1999,7 @@ TEST(crs, projectedCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 3375);
EXPECT_EQ(res.front().second, 70);
}
@@ -2021,7 +2021,7 @@ TEST(crs, projectedCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 3044);
EXPECT_EQ(res.front().second, 100);
}
@@ -2043,7 +2043,7 @@ TEST(crs, projectedCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 3044);
EXPECT_EQ(res.front().second, 25);
}
@@ -2064,7 +2064,7 @@ TEST(crs, projectedCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 3044);
EXPECT_EQ(res.front().second, 100);
}
@@ -2086,7 +2086,7 @@ TEST(crs, projectedCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 32119);
EXPECT_EQ(res.front().second, 70);
}
@@ -2097,7 +2097,7 @@ TEST(crs, projectedCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 0);
+ ASSERT_EQ(res.size(), 0U);
}
{
// ESRI:103729 definition as a PROJ string
@@ -2137,7 +2137,7 @@ TEST(crs, projectedCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 2327);
EXPECT_EQ(res.front().second, 50);
}
@@ -2152,7 +2152,7 @@ TEST(crs, projectedCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 6646);
EXPECT_EQ(res.front().second, 70);
}
@@ -2650,14 +2650,14 @@ TEST(crs, scope_area_bbox_remark) {
nn_dynamic_pointer_cast<GeodeticCRS>(WKTParser().createFromWKT(in_wkt));
ASSERT_TRUE(crs != nullptr);
- ASSERT_EQ(crs->domains().size(), 1);
+ ASSERT_EQ(crs->domains().size(), 1U);
auto domain = crs->domains()[0];
EXPECT_TRUE(domain->scope().has_value());
EXPECT_EQ(*(domain->scope()), "Geodesy, topographic mapping and cadastre");
ASSERT_TRUE(domain->domainOfValidity() != nullptr);
EXPECT_TRUE(domain->domainOfValidity()->description().has_value());
EXPECT_EQ(*(domain->domainOfValidity()->description()), "Japan");
- ASSERT_EQ(domain->domainOfValidity()->geographicElements().size(), 1);
+ ASSERT_EQ(domain->domainOfValidity()->geographicElements().size(), 1U);
auto geogElement = domain->domainOfValidity()->geographicElements()[0];
auto bbox = nn_dynamic_pointer_cast<GeographicBoundingBox>(geogElement);
ASSERT_TRUE(bbox != nullptr);
@@ -2666,13 +2666,13 @@ TEST(crs, scope_area_bbox_remark) {
EXPECT_EQ(bbox->northBoundLatitude(), 46.05);
EXPECT_EQ(bbox->eastBoundLongitude(), 157.64);
- ASSERT_EQ(domain->domainOfValidity()->verticalElements().size(), 1);
+ ASSERT_EQ(domain->domainOfValidity()->verticalElements().size(), 1U);
auto verticalElement = domain->domainOfValidity()->verticalElements()[0];
EXPECT_EQ(verticalElement->minimumValue(), -10000);
EXPECT_EQ(verticalElement->maximumValue(), 10000);
EXPECT_EQ(*(verticalElement->unit()), UnitOfMeasure::METRE);
- ASSERT_EQ(domain->domainOfValidity()->temporalElements().size(), 1);
+ ASSERT_EQ(domain->domainOfValidity()->temporalElements().size(), 1U);
auto temporalElement = domain->domainOfValidity()->temporalElements()[0];
EXPECT_EQ(temporalElement->start(), "2002-04-01");
EXPECT_EQ(temporalElement->stop(), "2011-10-21");
@@ -2842,7 +2842,7 @@ TEST(crs, verticalCRS_identify_db) {
{
// Identify by existing code
auto res = factory->createVerticalCRS("7651")->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 7651);
EXPECT_EQ(res.front().second, 100);
@@ -2861,7 +2861,7 @@ TEST(crs, verticalCRS_identify_db) {
sourceCRS->datum(), sourceCRS->datumEnsemble(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factory);
- EXPECT_EQ(res.size(), 0);
+ EXPECT_EQ(res.size(), 0U);
}
{
// Existing code, but not matching content
@@ -2874,7 +2874,7 @@ TEST(crs, verticalCRS_identify_db) {
sourceCRS->datum(), sourceCRS->datumEnsemble(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 7652);
EXPECT_EQ(res.front().second, 25);
}
@@ -2886,7 +2886,7 @@ TEST(crs, verticalCRS_identify_db) {
sourceCRS->datum(), sourceCRS->datumEnsemble(),
sourceCRS->coordinateSystem());
auto res = static_cast<const CRS *>(crs.get())->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 7651);
EXPECT_EQ(res.front().second, 100);
}
@@ -2898,7 +2898,7 @@ TEST(crs, verticalCRS_identify_db) {
sourceCRS->datum(), sourceCRS->datumEnsemble(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 7651);
EXPECT_EQ(res.front().second, 90);
}
@@ -2910,7 +2910,7 @@ TEST(crs, verticalCRS_identify_db) {
sourceCRS->datum(), sourceCRS->datumEnsemble(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 7651);
EXPECT_EQ(res.front().second, 25);
}
@@ -2921,7 +2921,7 @@ TEST(crs, verticalCRS_identify_db) {
sourceCRS->datum(), sourceCRS->datumEnsemble(),
sourceCRS->coordinateSystem());
auto res = crs->identify(factory);
- ASSERT_EQ(res.size(), 0);
+ ASSERT_EQ(res.size(), 0U);
}
}
@@ -3147,7 +3147,7 @@ TEST(crs, compoundCRS_identify_db) {
{
// Identify by existing code
auto res = factory->createCompoundCRS("8769")->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 8769);
EXPECT_EQ(res.front().second, 100);
@@ -3165,7 +3165,7 @@ TEST(crs, compoundCRS_identify_db) {
.set(Identifier::CODE_KEY, 1),
sourceCRS->componentReferenceSystems());
auto res = crs->identify(factory);
- EXPECT_EQ(res.size(), 0);
+ EXPECT_EQ(res.size(), 0U);
}
{
// Existing code, but not matching content
@@ -3177,7 +3177,7 @@ TEST(crs, compoundCRS_identify_db) {
.set(Identifier::CODE_KEY, 8770),
sourceCRS->componentReferenceSystems());
auto res = crs->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 8770);
EXPECT_EQ(res.front().second, 25);
}
@@ -3188,7 +3188,7 @@ TEST(crs, compoundCRS_identify_db) {
PropertyMap().set(IdentifiedObject::NAME_KEY, sourceCRS->nameStr()),
sourceCRS->componentReferenceSystems());
auto res = static_cast<const CRS *>(crs.get())->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 8769);
EXPECT_EQ(res.front().second, 100);
}
@@ -3204,7 +3204,7 @@ TEST(crs, compoundCRS_identify_db) {
"NAD83_Ohio_North_ftUS_NAVD88_height_ftUS"),
sourceCRS->componentReferenceSystems());
auto res = crs->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 8769);
EXPECT_EQ(res.front().second, 90);
}
@@ -3216,7 +3216,7 @@ TEST(crs, compoundCRS_identify_db) {
"NAD83_Ohio_North_ftUS_NAVD88_height_ftUS"),
sourceCRS->componentReferenceSystems());
auto res = crs->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 8769);
EXPECT_EQ(res.front().second, 25);
}
@@ -3226,7 +3226,7 @@ TEST(crs, compoundCRS_identify_db) {
PropertyMap().set(IdentifiedObject::NAME_KEY, "unrelated name"),
sourceCRS->componentReferenceSystems());
auto res = crs->identify(factory);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first->getEPSGCode(), 8769);
EXPECT_EQ(res.front().second, 70);
}
@@ -3261,7 +3261,7 @@ TEST(crs, boundCRS_to_WKT2) {
GeographicCRS::EPSG_4326->nameStr());
auto values = crs->transformation()->parameterValues();
- ASSERT_EQ(values.size(), 7);
+ ASSERT_EQ(values.size(), 7U);
{
const auto &opParamvalue =
nn_dynamic_pointer_cast<OperationParameterValue>(values[0]);
@@ -3586,7 +3586,7 @@ TEST(crs, boundCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<BoundCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
auto boundCRS = dynamic_cast<const BoundCRS *>(res.front().first.get());
ASSERT_TRUE(boundCRS != nullptr);
EXPECT_EQ(boundCRS->baseCRS()->getEPSGCode(), 2106);
@@ -3622,7 +3622,7 @@ TEST(crs, boundCRS_identify_db) {
auto crs = nn_dynamic_pointer_cast<BoundCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factoryEPSG);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().second, 25);
auto wkt = crs->exportToWKT(
WKTFormatter::create(WKTFormatter::Convention::WKT1_GDAL).get());
@@ -4851,7 +4851,7 @@ TEST(crs, crs_stripVerticalComponent) {
auto crs = GeographicCRS::EPSG_4979->stripVerticalComponent();
auto geogCRS = nn_dynamic_pointer_cast<GeographicCRS>(crs);
ASSERT_TRUE(geogCRS != nullptr);
- EXPECT_EQ(geogCRS->coordinateSystem()->axisList().size(), 2);
+ EXPECT_EQ(geogCRS->coordinateSystem()->axisList().size(), 2U);
}
{
@@ -4877,7 +4877,7 @@ TEST(crs, crs_stripVerticalComponent) {
auto projCRS = nn_dynamic_pointer_cast<ProjectedCRS>(
projected3DCrs->stripVerticalComponent());
ASSERT_TRUE(projCRS != nullptr);
- EXPECT_EQ(projCRS->coordinateSystem()->axisList().size(), 2);
+ EXPECT_EQ(projCRS->coordinateSystem()->axisList().size(), 2U);
}
}
@@ -5037,14 +5037,14 @@ TEST(crs, getNonDeprecated) {
Conversion::createUTM(PropertyMap(), 31, true),
CartesianCS::createEastingNorthing(UnitOfMeasure::METRE));
auto list = crs->getNonDeprecated(dbContext);
- ASSERT_EQ(list.size(), 0);
+ ASSERT_EQ(list.size(), 0U);
}
{
// Non-deprecated
auto crs = factory->createGeodeticCRS("4326");
auto list = crs->getNonDeprecated(dbContext);
- ASSERT_EQ(list.size(), 0);
+ ASSERT_EQ(list.size(), 0U);
}
{
@@ -5052,29 +5052,29 @@ TEST(crs, getNonDeprecated) {
auto crs = BoundCRS::createFromTOWGS84(
createProjected(), std::vector<double>{1, 2, 3, 4, 5, 6, 7});
auto list = crs->getNonDeprecated(dbContext);
- ASSERT_EQ(list.size(), 0);
+ ASSERT_EQ(list.size(), 0U);
}
{
auto crs = factory->createGeodeticCRS("4226");
auto list = crs->getNonDeprecated(dbContext);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
}
{
auto crs = factory->createProjectedCRS("26591");
auto list = crs->getNonDeprecated(dbContext);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
}
{
auto crs = factory->createVerticalCRS("5704");
auto list = crs->getNonDeprecated(dbContext);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
}
{
auto crs = factory->createCompoundCRS("7401");
auto list = crs->getNonDeprecated(dbContext);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
}
}
diff --git a/test/unit/test_datum.cpp b/test/unit/test_datum.cpp
index c6ccf5cf..23c14f67 100644
--- a/test/unit/test_datum.cpp
+++ b/test/unit/test_datum.cpp
@@ -370,7 +370,7 @@ TEST(datum, datum_ensemble) {
PropertyMap().set(IdentifiedObject::NAME_KEY, "test"),
std::vector<DatumNNPtr>{GeodeticReferenceFrame::EPSG_6326, otherDatum},
PositionalAccuracy::create("100"));
- EXPECT_EQ(ensemble->datums().size(), 2);
+ EXPECT_EQ(ensemble->datums().size(), 2U);
EXPECT_EQ(ensemble->positionalAccuracy()->value(), "100");
EXPECT_THROW(ensemble->exportToWKT(WKTFormatter::create().get()),
FormattingException);
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index 64512e56..40728f96 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -150,7 +150,7 @@ TEST(factory, AuthorityFactory_createPrimeMeridian) {
EXPECT_TRUE(nn_dynamic_pointer_cast<PrimeMeridian>(
factory->createObject("8903")) != nullptr);
auto pm = factory->createPrimeMeridian("8903");
- ASSERT_EQ(pm->identifiers().size(), 1);
+ ASSERT_EQ(pm->identifiers().size(), 1U);
EXPECT_EQ(pm->identifiers()[0]->code(), "8903");
EXPECT_EQ(*(pm->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(pm->name()->description()), "Paris");
@@ -174,7 +174,7 @@ TEST(factory, AuthorityFactory_createEllipsoid) {
EXPECT_TRUE(nn_dynamic_pointer_cast<Ellipsoid>(
factory->createObject("7030")) != nullptr);
auto ellipsoid = factory->createEllipsoid("7030");
- ASSERT_EQ(ellipsoid->identifiers().size(), 1);
+ ASSERT_EQ(ellipsoid->identifiers().size(), 1U);
EXPECT_EQ(ellipsoid->identifiers()[0]->code(), "7030");
EXPECT_EQ(*(ellipsoid->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(ellipsoid->name()->description()), "WGS 84");
@@ -211,7 +211,7 @@ TEST(factory, AuthorityFactory_createExtent) {
auto extent = factory->createExtent("1262");
EXPECT_EQ(*(extent->description()), "World");
const auto &geogElts = extent->geographicElements();
- ASSERT_EQ(geogElts.size(), 1);
+ ASSERT_EQ(geogElts.size(), 1U);
auto bbox = nn_dynamic_pointer_cast<GeographicBoundingBox>(geogElts[0]);
ASSERT_TRUE(bbox != nullptr);
EXPECT_EQ(bbox->westBoundLongitude(), -180);
@@ -237,7 +237,7 @@ TEST(factory, AuthorityFactory_createGeodeticDatum) {
EXPECT_THROW(factory->createGeodeticDatum("-1"),
NoSuchAuthorityCodeException);
auto grf = factory->createGeodeticDatum("6326");
- ASSERT_EQ(grf->identifiers().size(), 1);
+ ASSERT_EQ(grf->identifiers().size(), 1U);
EXPECT_EQ(grf->identifiers()[0]->code(), "6326");
EXPECT_EQ(*(grf->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(grf->name()->description()), "World Geodetic System 1984");
@@ -245,7 +245,7 @@ TEST(factory, AuthorityFactory_createGeodeticDatum) {
factory->createEllipsoid("7030").get()));
EXPECT_TRUE(grf->primeMeridian()->isEquivalentTo(
factory->createPrimeMeridian("8901").get()));
- ASSERT_EQ(grf->domains().size(), 1);
+ ASSERT_EQ(grf->domains().size(), 1U);
auto domain = grf->domains()[0];
auto extent = domain->domainOfValidity();
ASSERT_TRUE(extent != nullptr);
@@ -259,7 +259,7 @@ TEST(factory, AuthorityFactory_createVerticalDatum) {
EXPECT_THROW(factory->createVerticalDatum("-1"),
NoSuchAuthorityCodeException);
auto vrf = factory->createVerticalDatum("1027");
- ASSERT_EQ(vrf->identifiers().size(), 1);
+ ASSERT_EQ(vrf->identifiers().size(), 1U);
EXPECT_EQ(vrf->identifiers()[0]->code(), "1027");
EXPECT_EQ(*(vrf->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(vrf->name()->description()), "EGM2008 geoid");
@@ -290,12 +290,12 @@ TEST(factory, AuthorityFactory_createCoordinateSystem_ellipsoidal_2_axis) {
auto ellipsoidal_cs = nn_dynamic_pointer_cast<EllipsoidalCS>(cs);
ASSERT_TRUE(ellipsoidal_cs != nullptr);
- ASSERT_EQ(ellipsoidal_cs->identifiers().size(), 1);
+ ASSERT_EQ(ellipsoidal_cs->identifiers().size(), 1U);
EXPECT_EQ(ellipsoidal_cs->identifiers()[0]->code(), "6422");
EXPECT_EQ(*(ellipsoidal_cs->identifiers()[0]->codeSpace()), "EPSG");
const auto &axisList = ellipsoidal_cs->axisList();
- EXPECT_EQ(axisList.size(), 2);
+ EXPECT_EQ(axisList.size(), 2U);
EXPECT_EQ(*(axisList[0]->name()->description()), "Geodetic latitude");
EXPECT_EQ(axisList[0]->abbreviation(), "Lat");
@@ -317,12 +317,12 @@ TEST(factory, AuthorityFactory_createCoordinateSystem_ellipsoidal_3_axis) {
auto ellipsoidal_cs = nn_dynamic_pointer_cast<EllipsoidalCS>(cs);
ASSERT_TRUE(ellipsoidal_cs != nullptr);
- ASSERT_EQ(ellipsoidal_cs->identifiers().size(), 1);
+ ASSERT_EQ(ellipsoidal_cs->identifiers().size(), 1U);
EXPECT_EQ(ellipsoidal_cs->identifiers()[0]->code(), "6423");
EXPECT_EQ(*(ellipsoidal_cs->identifiers()[0]->codeSpace()), "EPSG");
const auto &axisList = ellipsoidal_cs->axisList();
- EXPECT_EQ(axisList.size(), 3);
+ EXPECT_EQ(axisList.size(), 3U);
EXPECT_EQ(*(axisList[0]->name()->description()), "Geodetic latitude");
EXPECT_EQ(axisList[0]->abbreviation(), "Lat");
@@ -349,12 +349,12 @@ TEST(factory, AuthorityFactory_createCoordinateSystem_geocentric) {
auto cartesian_cs = nn_dynamic_pointer_cast<CartesianCS>(cs);
ASSERT_TRUE(cartesian_cs != nullptr);
- ASSERT_EQ(cartesian_cs->identifiers().size(), 1);
+ ASSERT_EQ(cartesian_cs->identifiers().size(), 1U);
EXPECT_EQ(cartesian_cs->identifiers()[0]->code(), "6500");
EXPECT_EQ(*(cartesian_cs->identifiers()[0]->codeSpace()), "EPSG");
const auto &axisList = cartesian_cs->axisList();
- EXPECT_EQ(axisList.size(), 3);
+ EXPECT_EQ(axisList.size(), 3U);
EXPECT_EQ(*(axisList[0]->name()->description()), "Geocentric X");
EXPECT_EQ(axisList[0]->abbreviation(), "X");
@@ -383,12 +383,12 @@ TEST(factory, AuthorityFactory_createCoordinateSystem_vertical) {
auto vertical_cs = nn_dynamic_pointer_cast<VerticalCS>(cs);
ASSERT_TRUE(vertical_cs != nullptr);
- ASSERT_EQ(vertical_cs->identifiers().size(), 1);
+ ASSERT_EQ(vertical_cs->identifiers().size(), 1U);
EXPECT_EQ(vertical_cs->identifiers()[0]->code(), "6499");
EXPECT_EQ(*(vertical_cs->identifiers()[0]->codeSpace()), "EPSG");
const auto &axisList = vertical_cs->axisList();
- EXPECT_EQ(axisList.size(), 1);
+ EXPECT_EQ(axisList.size(), 1U);
EXPECT_EQ(*(axisList[0]->name()->description()), "Gravity-related height");
EXPECT_EQ(axisList[0]->abbreviation(), "H");
@@ -405,7 +405,7 @@ TEST(factory, AuthorityFactory_createGeodeticCRS_geographic2D) {
auto crs = factory->createGeodeticCRS("4326");
auto gcrs = nn_dynamic_pointer_cast<GeographicCRS>(crs);
ASSERT_TRUE(gcrs != nullptr);
- ASSERT_EQ(gcrs->identifiers().size(), 1);
+ ASSERT_EQ(gcrs->identifiers().size(), 1U);
EXPECT_EQ(gcrs->identifiers()[0]->code(), "4326");
EXPECT_EQ(*(gcrs->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(gcrs->name()->description()), "WGS 84");
@@ -440,7 +440,7 @@ TEST(factory, AuthorityFactory_createGeodeticCRS_geographic3D) {
auto crs = factory->createGeodeticCRS("4979");
auto gcrs = nn_dynamic_pointer_cast<GeographicCRS>(crs);
ASSERT_TRUE(gcrs != nullptr);
- ASSERT_EQ(gcrs->identifiers().size(), 1);
+ ASSERT_EQ(gcrs->identifiers().size(), 1U);
EXPECT_EQ(gcrs->identifiers()[0]->code(), "4979");
EXPECT_EQ(*(gcrs->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(gcrs->name()->description()), "WGS 84");
@@ -456,7 +456,7 @@ TEST(factory, AuthorityFactory_createGeodeticCRS_geocentric) {
auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG");
auto crs = factory->createGeodeticCRS("4978");
ASSERT_TRUE(nn_dynamic_pointer_cast<GeographicCRS>(crs) == nullptr);
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "4978");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(crs->name()->description()), "WGS 84");
@@ -474,7 +474,7 @@ TEST(factory, AuthorityFactory_createVerticalCRS) {
NoSuchAuthorityCodeException);
auto crs = factory->createVerticalCRS("3855");
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "3855");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(crs->name()->description()), "EGM2008 height");
@@ -496,19 +496,19 @@ TEST(factory, AuthorityFactory_createConversion) {
EXPECT_THROW(factory->createConversion("-1"), NoSuchAuthorityCodeException);
auto conv = factory->createConversion("16031");
- ASSERT_EQ(conv->identifiers().size(), 1);
+ ASSERT_EQ(conv->identifiers().size(), 1U);
EXPECT_EQ(conv->identifiers()[0]->code(), "16031");
EXPECT_EQ(*(conv->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(conv->name()->description()), "UTM zone 31N");
auto method = conv->method();
- ASSERT_EQ(method->identifiers().size(), 1);
+ ASSERT_EQ(method->identifiers().size(), 1U);
EXPECT_EQ(method->identifiers()[0]->code(), "9807");
EXPECT_EQ(*(method->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(method->name()->description()), "Transverse Mercator");
const auto &values = conv->parameterValues();
- ASSERT_EQ(values.size(), 5);
+ ASSERT_EQ(values.size(), 5U);
{
const auto &opParamvalue =
nn_dynamic_pointer_cast<OperationParameterValue>(values[0]);
@@ -547,7 +547,7 @@ TEST(factory, AuthorityFactory_createProjectedCRS) {
NoSuchAuthorityCodeException);
auto crs = factory->createProjectedCRS("32631");
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "32631");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(crs->name()->description()), "WGS 84 / UTM zone 31N");
@@ -573,7 +573,7 @@ TEST(factory, AuthorityFactory_createProjectedCRS_south_pole) {
auto crs = factory->createProjectedCRS("32761");
auto csList = crs->coordinateSystem()->axisList();
- ASSERT_EQ(csList.size(), 2);
+ ASSERT_EQ(csList.size(), 2U);
EXPECT_TRUE(csList[0]->meridian() != nullptr);
EXPECT_EQ(csList[0]->direction(), AxisDirection::NORTH);
EXPECT_EQ(
@@ -592,7 +592,7 @@ TEST(factory, AuthorityFactory_createProjectedCRS_north_pole) {
auto crs = factory->createProjectedCRS("32661");
auto csList = crs->coordinateSystem()->axisList();
- ASSERT_EQ(csList.size(), 2);
+ ASSERT_EQ(csList.size(), 2U);
EXPECT_TRUE(csList[0]->meridian() != nullptr);
EXPECT_EQ(csList[0]->direction(), AxisDirection::SOUTH);
EXPECT_EQ(
@@ -612,14 +612,14 @@ TEST(factory, AuthorityFactory_createCompoundCRS) {
NoSuchAuthorityCodeException);
auto crs = factory->createCompoundCRS("6871");
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "6871");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(*(crs->name()->description()),
"WGS 84 / Pseudo-Mercator + EGM2008 geoid height");
auto components = crs->componentReferenceSystems();
- ASSERT_EQ(components.size(), 2);
+ ASSERT_EQ(components.size(), 2U);
EXPECT_TRUE(components[0]->isEquivalentTo(
factory->createProjectedCRS("3857").get()));
EXPECT_TRUE(components[1]->isEquivalentTo(
@@ -1018,7 +1018,7 @@ TEST(factory,
auto concatenated = nn_dynamic_pointer_cast<ConcatenatedOperation>(op);
ASSERT_TRUE(concatenated != nullptr);
auto operations = concatenated->operations();
- ASSERT_EQ(operations.size(), 2);
+ ASSERT_EQ(operations.size(), 2U);
EXPECT_TRUE(operations[0]->isEquivalentTo(
factory->createCoordinateOperation("3895", false).get()));
EXPECT_TRUE(operations[1]->isEquivalentTo(
@@ -1035,7 +1035,7 @@ TEST(
auto concatenated = nn_dynamic_pointer_cast<ConcatenatedOperation>(op);
ASSERT_TRUE(concatenated != nullptr);
auto operations = concatenated->operations();
- ASSERT_EQ(operations.size(), 3);
+ ASSERT_EQ(operations.size(), 3U);
EXPECT_TRUE(operations[0]->isEquivalentTo(
factory->createCoordinateOperation("1313", false).get()));
EXPECT_TRUE(operations[1]->isEquivalentTo(
@@ -1054,7 +1054,7 @@ TEST(
auto concatenated = nn_dynamic_pointer_cast<ConcatenatedOperation>(op);
ASSERT_TRUE(concatenated != nullptr);
auto operations = concatenated->operations();
- ASSERT_EQ(operations.size(), 2);
+ ASSERT_EQ(operations.size(), 2U);
EXPECT_TRUE(operations[0]->isEquivalentTo(
factory->createCoordinateOperation("8364", false)->inverse().get()));
EXPECT_TRUE(operations[1]->isEquivalentTo(
@@ -1071,7 +1071,7 @@ TEST(
auto concatenated = nn_dynamic_pointer_cast<ConcatenatedOperation>(op);
ASSERT_TRUE(concatenated != nullptr);
auto operations = concatenated->operations();
- ASSERT_EQ(operations.size(), 2);
+ ASSERT_EQ(operations.size(), 2U);
EXPECT_TRUE(operations[0]->isEquivalentTo(
factory->createCoordinateOperation("1763", false).get()));
EXPECT_TRUE(operations[1]->isEquivalentTo(
@@ -1088,7 +1088,7 @@ TEST(
auto concatenated = nn_dynamic_pointer_cast<ConcatenatedOperation>(op);
ASSERT_TRUE(concatenated != nullptr);
auto operations = concatenated->operations();
- ASSERT_EQ(operations.size(), 2);
+ ASSERT_EQ(operations.size(), 2U);
EXPECT_TRUE(operations[0]->isEquivalentTo(
factory->createCoordinateOperation("7972", false).get()));
EXPECT_TRUE(operations[1]->isEquivalentTo(
@@ -1537,7 +1537,7 @@ class FactoryWithTmpDatabase : public ::testing::Test {
auto res = factoryOTHER->createFromCRSCodesWithIntermediates(
"NS_SOURCE", "SOURCE", "NS_TARGET", "TARGET", false, false,
false, {});
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_TRUE(res.empty() ||
nn_dynamic_pointer_cast<ConcatenatedOperation>(res[0]));
@@ -1545,7 +1545,7 @@ class FactoryWithTmpDatabase : public ::testing::Test {
"NS_SOURCE", "SOURCE", "NS_TARGET", "TARGET", false, false,
false, {std::make_pair(std::string("NS_PIVOT"),
std::string("PIVOT"))});
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_TRUE(res.empty() ||
nn_dynamic_pointer_cast<ConcatenatedOperation>(res[0]));
@@ -1553,18 +1553,18 @@ class FactoryWithTmpDatabase : public ::testing::Test {
"NS_SOURCE", "SOURCE", "NS_TARGET", "TARGET", false, false,
false, {std::make_pair(std::string("NS_PIVOT"),
std::string("NOT_EXISTING"))});
- EXPECT_EQ(res.size(), 0);
+ EXPECT_EQ(res.size(), 0U);
res = factoryOTHER->createFromCRSCodesWithIntermediates(
"NS_SOURCE", "SOURCE", "NS_TARGET", "TARGET", false, false,
false,
{std::make_pair(std::string("BAD_NS"), std::string("PIVOT"))});
- EXPECT_EQ(res.size(), 0);
+ EXPECT_EQ(res.size(), 0U);
res = factoryOTHER->createFromCRSCodesWithIntermediates(
"NS_TARGET", "TARGET", "NS_SOURCE", "SOURCE", false, false,
false, {});
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_TRUE(res.empty() ||
nn_dynamic_pointer_cast<ConcatenatedOperation>(res[0]));
}
@@ -1574,7 +1574,7 @@ class FactoryWithTmpDatabase : public ::testing::Test {
auto res = factory->createFromCRSCodesWithIntermediates(
"NS_SOURCE", "SOURCE", "NS_TARGET", "TARGET", false, false,
false, {});
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_TRUE(res.empty() ||
nn_dynamic_pointer_cast<ConcatenatedOperation>(res[0]));
@@ -1590,7 +1590,7 @@ class FactoryWithTmpDatabase : public ::testing::Test {
CoordinateOperationContext::create(factory, nullptr, 0);
res = CoordinateOperationFactory::create()->createOperations(
srcCRS, targetCRS, ctxt);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_TRUE(
res.empty() ||
nn_dynamic_pointer_cast<ConcatenatedOperation>(res[0]));
@@ -1603,7 +1603,7 @@ class FactoryWithTmpDatabase : public ::testing::Test {
std::string("NS_PIVOT"), std::string("PIVOT"))});
res = CoordinateOperationFactory::create()->createOperations(
srcCRS, targetCRS, ctxt);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_TRUE(
res.empty() ||
nn_dynamic_pointer_cast<ConcatenatedOperation>(res[0]));
@@ -1615,7 +1615,7 @@ class FactoryWithTmpDatabase : public ::testing::Test {
ctxt->setAllowUseIntermediateCRS(false);
res = CoordinateOperationFactory::create()->createOperations(
srcCRS, targetCRS, ctxt);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_TRUE(res.empty() ||
nn_dynamic_pointer_cast<Transformation>(res[0]));
}
@@ -1627,7 +1627,7 @@ class FactoryWithTmpDatabase : public ::testing::Test {
std::string("NS_PIVOT"), std::string("NOT_EXISTING"))});
res = CoordinateOperationFactory::create()->createOperations(
srcCRS, targetCRS, ctxt);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
EXPECT_TRUE(res.empty() ||
nn_dynamic_pointer_cast<Transformation>(res[0]));
}
@@ -1723,7 +1723,7 @@ TEST(factory, AuthorityFactory_createFromCoordinateReferenceSystemCodes) {
{
auto res =
factory->createFromCoordinateReferenceSystemCodes("4326", "32631");
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_TRUE(res[0]->sourceCRS() != nullptr);
EXPECT_TRUE(res[0]->targetCRS() != nullptr);
EXPECT_TRUE(
@@ -1742,7 +1742,7 @@ TEST(factory, AuthorityFactory_createFromCoordinateReferenceSystemCodes) {
{
auto list =
factory->createFromCoordinateReferenceSystemCodes("4179", "4258");
- ASSERT_EQ(list.size(), 3);
+ ASSERT_EQ(list.size(), 3U);
// Romania has a larger area than Poland (given our approx formula)
EXPECT_EQ(list[0]->getEPSGCode(), 15994); // Romania - 3m
EXPECT_EQ(list[1]->getEPSGCode(), 15993); // Romania - 10m
@@ -1752,7 +1752,7 @@ TEST(factory, AuthorityFactory_createFromCoordinateReferenceSystemCodes) {
// Test removal of superseded transform
auto list = factory->createFromCoordinateReferenceSystemCodes(
"EPSG", "4179", "EPSG", "4258", false, false, true);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
// Romania has a larger area than Poland (given our approx formula)
EXPECT_EQ(list[0]->getEPSGCode(), 15994); // Romania - 3m
EXPECT_EQ(list[1]->getEPSGCode(), 1644); // Poland - 1m
@@ -1770,7 +1770,7 @@ TEST(
{
auto res = factory->createFromCoordinateReferenceSystemCodes(
"EPSG", "4326", "EPSG", "32631", false, false, false);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
}
{
auto res = factory->createFromCoordinateReferenceSystemCodes(
@@ -1808,7 +1808,7 @@ TEST_F(FactoryWithTmpDatabase,
{
auto res = factoryGeneral->createFromCoordinateReferenceSystemCodes(
"OTHER", "OTHER_4326", "OTHER", "OTHER_32631", false, false, false);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
}
auto factoryEPSG =
@@ -1816,7 +1816,7 @@ TEST_F(FactoryWithTmpDatabase,
{
auto res = factoryEPSG->createFromCoordinateReferenceSystemCodes(
"OTHER", "OTHER_4326", "OTHER", "OTHER_32631", false, false, false);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
}
auto factoryOTHER =
@@ -1824,7 +1824,7 @@ TEST_F(FactoryWithTmpDatabase,
{
auto res = factoryOTHER->createFromCoordinateReferenceSystemCodes(
"OTHER_4326", "OTHER_32631");
- ASSERT_EQ(res.size(), 0); // the conversion is in the EPSG space
+ ASSERT_EQ(res.size(), 0U); // the conversion is in the EPSG space
}
ASSERT_TRUE(execute(
@@ -1838,17 +1838,17 @@ TEST_F(FactoryWithTmpDatabase,
{
auto res = factoryGeneral->createFromCoordinateReferenceSystemCodes(
"EPSG", "4326", "OTHER", "OTHER_4326", false, false, false);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
}
{
auto res = factoryEPSG->createFromCoordinateReferenceSystemCodes(
"EPSG", "4326", "OTHER", "OTHER_4326", false, false, false);
- ASSERT_EQ(res.size(), 0);
+ ASSERT_EQ(res.size(), 0U);
}
{
auto res = factoryOTHER->createFromCoordinateReferenceSystemCodes(
"EPSG", "4326", "OTHER", "OTHER_4326", false, false, false);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
}
}
@@ -1899,7 +1899,7 @@ TEST_F(FactoryWithTmpDatabase,
AuthorityFactory::create(DatabaseContext::create(m_ctxt), "OTHER");
auto res = factoryOTHER->createFromCoordinateReferenceSystemCodes(
"EPSG", "4326", "EPSG", "4326", false, false, false);
- ASSERT_EQ(res.size(), 3);
+ ASSERT_EQ(res.size(), 3U);
EXPECT_EQ(*(res[0]->name()->description()), "TRANSFORMATION_1M");
EXPECT_EQ(*(res[1]->name()->description()), "TRANSFORMATION_10M");
EXPECT_EQ(*(res[2]->name()->description()),
@@ -1918,7 +1918,7 @@ TEST_F(
std::string());
auto res = factory->createFromCRSCodesWithIntermediates(
"EPSG", "4326", "EPSG", "4326", false, false, false, {});
- EXPECT_EQ(res.size(), 0);
+ EXPECT_EQ(res.size(), 0U);
}
// ---------------------------------------------------------------------------
@@ -2002,7 +2002,7 @@ TEST_F(FactoryWithTmpDatabase, AuthorityFactory_proj_based_transformation) {
AuthorityFactory::create(DatabaseContext::create(m_ctxt), "OTHER");
auto res = factoryOTHER->createFromCoordinateReferenceSystemCodes(
"EPSG", "4326", "EPSG", "4326", false, false, false);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res[0]->nameStr(), "My PROJ string based op");
EXPECT_EQ(res[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +ellps=WGS84 +step +proj=longlat");
@@ -2063,7 +2063,7 @@ TEST_F(FactoryWithTmpDatabase, AuthorityFactory_wkt_based_transformation) {
AuthorityFactory::create(DatabaseContext::create(m_ctxt), "OTHER");
auto res = factoryOTHER->createFromCoordinateReferenceSystemCodes(
"EPSG", "4326", "EPSG", "4326", false, false, false);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res[0]->nameStr(), "My WKT string based op");
EXPECT_EQ(res[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=push +v_3 +step +proj=axisswap "
@@ -2145,7 +2145,7 @@ TEST_F(FactoryWithTmpDatabase, getAuthorities) {
populateWithFakeEPSG();
auto res = DatabaseContext::create(m_ctxt)->getAuthorities();
- EXPECT_EQ(res.size(), 2);
+ EXPECT_EQ(res.size(), 2U);
EXPECT_TRUE(res.find("EPSG") != res.end());
EXPECT_TRUE(res.find("PROJ") != res.end());
}
@@ -2237,7 +2237,7 @@ TEST_F(FactoryWithTmpDatabase, custom_geodetic_crs) {
auto crs = factory->createGeodeticCRS("TEST");
EXPECT_TRUE(nn_dynamic_pointer_cast<GeographicCRS>(crs) != nullptr);
EXPECT_EQ(*(crs->name()->description()), "my name TEST");
- EXPECT_EQ(crs->identifiers().size(), 1);
+ EXPECT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->ellipsoid()->semiMajorAxis(), Length(2));
EXPECT_EQ(*(crs->ellipsoid()->inverseFlattening()), Scale(300));
EXPECT_TRUE(crs->canonicalBoundCRS() == nullptr);
@@ -2246,7 +2246,7 @@ TEST_F(FactoryWithTmpDatabase, custom_geodetic_crs) {
auto crs = factory->createGeodeticCRS("TEST_BOUND");
EXPECT_TRUE(nn_dynamic_pointer_cast<GeographicCRS>(crs) != nullptr);
EXPECT_EQ(*(crs->name()->description()), "my name TEST");
- EXPECT_EQ(crs->identifiers().size(), 1);
+ EXPECT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->ellipsoid()->semiMajorAxis(), Length(2));
EXPECT_EQ(*(crs->ellipsoid()->inverseFlattening()), Scale(300));
EXPECT_TRUE(crs->canonicalBoundCRS() != nullptr);
@@ -2255,7 +2255,7 @@ TEST_F(FactoryWithTmpDatabase, custom_geodetic_crs) {
auto crs = factory->createGeodeticCRS("TEST_GC");
EXPECT_TRUE(nn_dynamic_pointer_cast<GeographicCRS>(crs) == nullptr);
EXPECT_EQ(*(crs->name()->description()), "my name");
- EXPECT_EQ(crs->identifiers().size(), 1);
+ EXPECT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->ellipsoid()->semiMajorAxis(), Length(2));
EXPECT_EQ(*(crs->ellipsoid()->inverseFlattening()), Scale(300));
}
@@ -2263,7 +2263,7 @@ TEST_F(FactoryWithTmpDatabase, custom_geodetic_crs) {
auto crs = factory->createGeodeticCRS("TEST_REF_ANOTHER");
EXPECT_TRUE(nn_dynamic_pointer_cast<GeographicCRS>(crs) != nullptr);
EXPECT_EQ(*(crs->name()->description()), "my name TEST_REF_ANOTHER");
- EXPECT_EQ(crs->identifiers().size(), 1);
+ EXPECT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->ellipsoid()->semiMajorAxis(), Length(2));
EXPECT_EQ(*(crs->ellipsoid()->inverseFlattening()), Scale(300));
}
@@ -2344,7 +2344,7 @@ TEST_F(FactoryWithTmpDatabase, custom_projected_crs) {
{
auto crs = factory->createProjectedCRS("TEST");
EXPECT_EQ(*(crs->name()->description()), "my name");
- EXPECT_EQ(crs->identifiers().size(), 1);
+ EXPECT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->derivingConversion()->targetCRS().get(), crs.get());
EXPECT_EQ(crs->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=mbt_s +datum=WGS84 +units=m +no_defs +type=crs");
@@ -2353,7 +2353,7 @@ TEST_F(FactoryWithTmpDatabase, custom_projected_crs) {
{
auto crs = factory->createProjectedCRS("TEST_BOUND");
EXPECT_EQ(*(crs->name()->description()), "my name");
- EXPECT_EQ(crs->identifiers().size(), 1);
+ EXPECT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->derivingConversion()->targetCRS().get(), crs.get());
EXPECT_EQ(crs->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=mbt_s +datum=WGS84 +units=m +no_defs +type=crs");
@@ -2368,7 +2368,7 @@ TEST_F(FactoryWithTmpDatabase, custom_projected_crs) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factory);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
if (!res.empty()) {
EXPECT_EQ(res.front().first->nameStr(), "merc");
}
@@ -2380,7 +2380,7 @@ TEST_F(FactoryWithTmpDatabase, custom_projected_crs) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factory);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
if (!res.empty()) {
EXPECT_EQ(res.front().first->nameStr(), "merc2");
}
@@ -2392,7 +2392,7 @@ TEST_F(FactoryWithTmpDatabase, custom_projected_crs) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factory);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
if (!res.empty()) {
EXPECT_EQ(res.front().first->nameStr(), "merc2");
}
@@ -2404,7 +2404,7 @@ TEST_F(FactoryWithTmpDatabase, custom_projected_crs) {
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
auto res = crs->identify(factory);
- EXPECT_EQ(res.size(), 1);
+ EXPECT_EQ(res.size(), 1U);
if (!res.empty()) {
EXPECT_EQ(res.front().first->nameStr(), "WKT1_GDAL");
}
@@ -2635,7 +2635,7 @@ TEST_F(FactoryWithTmpDatabase,
AuthorityFactory::create(dbContext, "EPSG")
->createCoordinateReferenceSystem("4326"),
ctxt);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
EXPECT_EQ(list[0]->nameStr(), "WHOLE_AREA_APPROX_ACCURACY");
EXPECT_EQ(list[1]->nameStr(), "PARTIAL_AREA_PERFECT_ACCURACY");
}
@@ -2647,24 +2647,24 @@ TEST(factory, createObjectsFromName) {
auto factory = AuthorityFactory::create(ctxt, std::string());
auto factoryEPSG = AuthorityFactory::create(ctxt, "EPSG");
- EXPECT_EQ(factory->createObjectsFromName("").size(), 0);
+ EXPECT_EQ(factory->createObjectsFromName("").size(), 0U);
// ellipsoid + 3 geodeticCRS
- EXPECT_EQ(factory->createObjectsFromName("WGS 84", {}, false).size(), 4);
+ EXPECT_EQ(factory->createObjectsFromName("WGS 84", {}, false).size(), 4U);
EXPECT_EQ(factory->createObjectsFromName("WGS 84", {}, true, 10).size(),
- 10);
+ 10U);
EXPECT_EQ(factory
->createObjectsFromName(
"WGS 84", {AuthorityFactory::ObjectType::CRS}, false)
.size(),
- 3);
+ 3U);
{
auto res = factoryEPSG->createObjectsFromName(
"WGS84", {AuthorityFactory::ObjectType::GEOGRAPHIC_2D_CRS}, true);
- EXPECT_EQ(res.size(), 2); // EPSG:4326 and EPSG:4030
+ EXPECT_EQ(res.size(), 2U); // EPSG:4326 and EPSG:4030
if (!res.empty()) {
EXPECT_EQ(res.front()->getEPSGCode(), 4326);
}
@@ -2672,87 +2672,87 @@ TEST(factory, createObjectsFromName) {
// Prime meridian
EXPECT_EQ(factoryEPSG->createObjectsFromName("Paris", {}, false, 2).size(),
- 1);
+ 1U);
// Ellipsoid
EXPECT_EQ(
factoryEPSG->createObjectsFromName("Clarke 1880 (IGN)", {}, false, 2)
.size(),
- 1);
+ 1U);
// Geodetic datum
EXPECT_EQ(
factoryEPSG->createObjectsFromName("Hungarian Datum 1909", {}, false, 2)
.size(),
- 1);
+ 1U);
// Vertical datum
EXPECT_EQ(factoryEPSG->createObjectsFromName("EGM2008 geoid", {}, false, 2)
.size(),
- 1);
+ 1U);
// Geodetic CRS
EXPECT_EQ(factoryEPSG
->createObjectsFromName(
"Unknown datum based upon the Airy 1830 ellipsoid", {},
false, 2)
.size(),
- 1);
+ 1U);
// Projected CRS
EXPECT_EQ(factoryEPSG
->createObjectsFromName(
"Anguilla 1957 / British West Indies Grid", {}, false, 2)
.size(),
- 1);
+ 1U);
// Vertical CRS
EXPECT_EQ(factoryEPSG->createObjectsFromName("EGM2008 height", {}, false, 2)
.size(),
- 1);
+ 1U);
// Compound CRS
EXPECT_EQ(factoryEPSG
->createObjectsFromName(
"KKJ / Finland Uniform Coordinate System + N60 height",
{}, false, 2)
.size(),
- 1);
+ 1U);
// Conversion
EXPECT_EQ(
factoryEPSG->createObjectsFromName("Belgian Lambert 2008", {}, false, 2)
.size(),
- 1);
+ 1U);
// Helmert transform
EXPECT_EQ(
factoryEPSG->createObjectsFromName("MGI to ETRS89 (4)", {}, false, 2)
.size(),
- 1);
+ 1U);
// Grid transform
EXPECT_EQ(factoryEPSG
->createObjectsFromName("Guam 1963 to NAD83(HARN) (1)", {},
false, 2)
.size(),
- 1);
+ 1U);
// Other transform
EXPECT_EQ(factoryEPSG
->createObjectsFromName(
"Monte Mario (Rome) to Monte Mario (1)", {}, false, 2)
.size(),
- 1);
+ 1U);
// Concatenated operation
EXPECT_EQ(
factoryEPSG
->createObjectsFromName("MGI (Ferro) to WGS 84 (2)", {}, false, 2)
.size(),
- 1);
+ 1U);
// Deprecated object
EXPECT_EQ(factoryEPSG
->createObjectsFromName(
"NAD27(CGQ77) / SCoPQ zone 2 (deprecated)", {}, false, 2)
.size(),
- 1);
+ 1U);
// Deprecated object (but without explicit deprecated)
EXPECT_EQ(
factoryEPSG
->createObjectsFromName("NAD27(CGQ77) / SCoPQ zone 2", {}, false, 2)
.size(),
- 1);
+ 1U);
const auto types = std::vector<AuthorityFactory::ObjectType>{
AuthorityFactory::ObjectType::PRIME_MERIDIAN,
@@ -2798,7 +2798,7 @@ TEST(factory, listAreaOfUseFromName) {
auto factoryEPSG = AuthorityFactory::create(ctxt, "EPSG");
{
auto res = factory->listAreaOfUseFromName("Denmark - onshore", false);
- ASSERT_EQ(res.size(), 1);
+ ASSERT_EQ(res.size(), 1U);
EXPECT_EQ(res.front().first, "EPSG");
EXPECT_EQ(res.front().second, "3237");
}
@@ -2808,7 +2808,7 @@ TEST(factory, listAreaOfUseFromName) {
}
{
auto res = factory->listAreaOfUseFromName("no where land", false);
- ASSERT_EQ(res.size(), 0);
+ ASSERT_EQ(res.size(), 0U);
}
}
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp
index d033508f..2cc05aad 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -79,7 +79,7 @@ TEST(io, wkt_parsing) {
{
auto n = WKTNode::createFrom("MYNODE[\"x\"]");
EXPECT_EQ(n->value(), "MYNODE");
- ASSERT_EQ(n->children().size(), 1);
+ ASSERT_EQ(n->children().size(), 1U);
EXPECT_EQ(n->children()[0]->value(), "\"x\"");
EXPECT_EQ(n->toString(), "MYNODE[\"x\"]");
}
@@ -89,14 +89,14 @@ TEST(io, wkt_parsing) {
{
auto n = WKTNode::createFrom("MYNODE[ \"x\" ]");
EXPECT_EQ(n->value(), "MYNODE");
- ASSERT_EQ(n->children().size(), 1);
+ ASSERT_EQ(n->children().size(), 1U);
EXPECT_EQ(n->children()[0]->value(), "\"x\"");
}
{
auto n = WKTNode::createFrom("MYNODE[\"x[\",1]");
EXPECT_EQ(n->value(), "MYNODE");
- ASSERT_EQ(n->children().size(), 2);
+ ASSERT_EQ(n->children().size(), 2U);
EXPECT_EQ(n->children()[0]->value(), "\"x[\"");
EXPECT_EQ(n->children()[1]->value(), "1");
EXPECT_EQ(n->toString(), "MYNODE[\"x[\",1]");
@@ -107,9 +107,9 @@ TEST(io, wkt_parsing) {
{
auto n = WKTNode::createFrom("A[B[y]]");
EXPECT_EQ(n->value(), "A");
- ASSERT_EQ(n->children().size(), 1);
+ ASSERT_EQ(n->children().size(), 1U);
EXPECT_EQ(n->children()[0]->value(), "B");
- ASSERT_EQ(n->children()[0]->children().size(), 1);
+ ASSERT_EQ(n->children()[0]->children().size(), 1U);
EXPECT_EQ(n->children()[0]->children()[0]->value(), "y");
EXPECT_EQ(n->toString(), "A[B[y]]");
}
@@ -311,7 +311,7 @@ TEST(wkt_parse, geogcrs_with_ensemble) {
ASSERT_TRUE(crs != nullptr);
ASSERT_TRUE(crs->datum() == nullptr);
ASSERT_TRUE(crs->datumEnsemble() != nullptr);
- EXPECT_EQ(crs->datumEnsemble()->datums().size(), 6);
+ EXPECT_EQ(crs->datumEnsemble()->datums().size(), 6U);
}
// ---------------------------------------------------------------------------
@@ -341,14 +341,14 @@ TEST(wkt_parse, invalid_geogcrs_with_ensemble) {
static void checkEPSG_4326(GeographicCRSPtr crs, bool latLong = true,
bool checkEPSGCodes = true) {
if (checkEPSGCodes) {
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "4326");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
}
EXPECT_EQ(crs->nameStr(), "WGS 84");
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 2);
+ ASSERT_EQ(cs->axisList().size(), 2U);
if (latLong) {
EXPECT_TRUE(cs->axisList()[0]->nameStr() == "Latitude" ||
cs->axisList()[0]->nameStr() == "Geodetic latitude")
@@ -373,7 +373,7 @@ static void checkEPSG_4326(GeographicCRSPtr crs, bool latLong = true,
auto datum = crs->datum();
if (checkEPSGCodes) {
- ASSERT_EQ(datum->identifiers().size(), 1);
+ ASSERT_EQ(datum->identifiers().size(), 1U);
EXPECT_EQ(datum->identifiers()[0]->code(), "6326");
EXPECT_EQ(*(datum->identifiers()[0]->codeSpace()), "EPSG");
}
@@ -384,7 +384,7 @@ static void checkEPSG_4326(GeographicCRSPtr crs, bool latLong = true,
EXPECT_EQ(ellipsoid->semiMajorAxis().unit(), UnitOfMeasure::METRE);
EXPECT_EQ(ellipsoid->inverseFlattening()->value(), 298.257223563);
if (checkEPSGCodes) {
- ASSERT_EQ(ellipsoid->identifiers().size(), 1);
+ ASSERT_EQ(ellipsoid->identifiers().size(), 1U);
EXPECT_EQ(ellipsoid->identifiers()[0]->code(), "7030");
EXPECT_EQ(*(ellipsoid->identifiers()[0]->codeSpace()), "EPSG");
}
@@ -431,7 +431,7 @@ TEST(wkt_parse, wkt1_EPSG_4267) {
ASSERT_TRUE(crs != nullptr);
auto datum = crs->datum();
- ASSERT_EQ(datum->identifiers().size(), 1);
+ ASSERT_EQ(datum->identifiers().size(), 1U);
EXPECT_EQ(datum->identifiers()[0]->code(), "6267");
EXPECT_EQ(*(datum->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(datum->nameStr(), "North American Datum 1927");
@@ -723,13 +723,13 @@ TEST(wkt_parse, wkt2_TRF) {
// ---------------------------------------------------------------------------
static void checkEPSG_4979(GeographicCRSPtr crs) {
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "4979");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
EXPECT_EQ(crs->nameStr(), "WGS 84");
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 3);
+ ASSERT_EQ(cs->axisList().size(), 3U);
EXPECT_EQ(cs->axisList()[0]->nameStr(), "Latitude");
EXPECT_EQ(cs->axisList()[0]->abbreviation(), "lat");
EXPECT_EQ(cs->axisList()[0]->direction(), AxisDirection::NORTH);
@@ -782,7 +782,7 @@ static void checkGeocentric(GeodeticCRSPtr crs) {
EXPECT_TRUE(crs->isGeocentric());
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 3);
+ ASSERT_EQ(cs->axisList().size(), 3U);
EXPECT_EQ(cs->axisList()[0]->nameStr(), "Geocentric X");
EXPECT_EQ(cs->axisList()[0]->abbreviation(), "X");
@@ -909,7 +909,7 @@ TEST(wkt_parse, wkt1_geocentric_with_z_OTHER) {
static void checkProjected(ProjectedCRSPtr crs, bool checkEPSGCodes = true) {
EXPECT_EQ(crs->nameStr(), "WGS 84 / UTM zone 31N");
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "32631");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
@@ -922,7 +922,7 @@ static void checkProjected(ProjectedCRSPtr crs, bool checkEPSGCodes = true) {
auto method = conversion->method();
EXPECT_EQ(method->nameStr(), "Transverse Mercator");
auto values = conversion->parameterValues();
- ASSERT_EQ(values.size(), 5);
+ ASSERT_EQ(values.size(), 5U);
{
const auto &opParamvalue =
nn_dynamic_pointer_cast<OperationParameterValue>(values[0]);
@@ -985,7 +985,7 @@ static void checkProjected(ProjectedCRSPtr crs, bool checkEPSGCodes = true) {
}
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 2);
+ ASSERT_EQ(cs->axisList().size(), 2U);
EXPECT_EQ(cs->axisList()[0]->nameStr(), "Easting");
EXPECT_EQ(cs->axisList()[0]->abbreviation(), "E");
@@ -1097,7 +1097,7 @@ TEST(wkt_parse, wkt1_projected_wrong_axis_geogcs) {
EXPECT_TRUE(crs->baseCRS()->identifiers().empty());
auto cs = crs->baseCRS()->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 2);
+ ASSERT_EQ(cs->axisList().size(), 2U);
EXPECT_EQ(cs->axisList()[0]->direction(), AxisDirection::EAST);
EXPECT_EQ(cs->axisList()[1]->direction(), AxisDirection::NORTH);
}
@@ -1806,7 +1806,7 @@ TEST(wkt_parse, cs_with_MERIDIAN) {
auto obj = WKTParser().createFromWKT(wkt);
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
- ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 2);
+ ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 2U);
auto axis = crs->coordinateSystem()->axisList()[0];
auto meridian = axis->meridian();
ASSERT_TRUE(meridian != nullptr);
@@ -1833,7 +1833,7 @@ TEST(wkt_parse, cs_with_multiple_ID) {
auto crs = nn_dynamic_pointer_cast<GeodeticCRS>(obj);
ASSERT_TRUE(crs != nullptr);
EXPECT_EQ(crs->nameStr(), "WGS 84");
- ASSERT_EQ(crs->identifiers().size(), 2);
+ ASSERT_EQ(crs->identifiers().size(), 2U);
EXPECT_EQ(crs->identifiers()[0]->code(), "codeA");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "authorityA");
EXPECT_EQ(crs->identifiers()[1]->code(), "codeB");
@@ -1854,18 +1854,18 @@ TEST(wkt_parse, vertcrs_WKT2) {
auto crs = nn_dynamic_pointer_cast<VerticalCRS>(obj);
ASSERT_TRUE(crs != nullptr);
EXPECT_EQ(crs->nameStr(), "ODN height");
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "5701");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
auto datum = crs->datum();
EXPECT_EQ(datum->nameStr(), "Ordnance Datum Newlyn");
- // ASSERT_EQ(datum->identifiers().size(), 1);
+ // ASSERT_EQ(datum->identifiers().size(), 1U);
// EXPECT_EQ(datum->identifiers()[0]->code(), "5101");
// EXPECT_EQ(*(datum->identifiers()[0]->codeSpace()), "EPSG");
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 1);
+ ASSERT_EQ(cs->axisList().size(), 1U);
EXPECT_EQ(cs->axisList()[0]->nameStr(), "Gravity-related height");
EXPECT_EQ(cs->axisList()[0]->abbreviation(), "H");
EXPECT_EQ(cs->axisList()[0]->direction(), AxisDirection::UP);
@@ -1916,18 +1916,18 @@ TEST(wkt_parse, vertcrs_WKT1_GDAL) {
auto crs = nn_dynamic_pointer_cast<VerticalCRS>(obj);
ASSERT_TRUE(crs != nullptr);
EXPECT_EQ(crs->nameStr(), "ODN height");
- ASSERT_EQ(crs->identifiers().size(), 1);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "5701");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "EPSG");
auto datum = crs->datum();
EXPECT_EQ(datum->nameStr(), "Ordnance Datum Newlyn");
- ASSERT_EQ(datum->identifiers().size(), 1);
+ ASSERT_EQ(datum->identifiers().size(), 1U);
EXPECT_EQ(datum->identifiers()[0]->code(), "5101");
EXPECT_EQ(*(datum->identifiers()[0]->codeSpace()), "EPSG");
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 1);
+ ASSERT_EQ(cs->axisList().size(), 1U);
EXPECT_EQ(cs->axisList()[0]->nameStr(), "Gravity-related height");
EXPECT_EQ(cs->axisList()[0]->abbreviation(), ""); // "H" in WKT2
EXPECT_EQ(cs->axisList()[0]->direction(), AxisDirection::UP);
@@ -1948,7 +1948,7 @@ TEST(wkt_parse, vertcrs_WKT1_GDAL_minimum) {
EXPECT_EQ(datum->nameStr(), "Ordnance Datum Newlyn");
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 1);
+ ASSERT_EQ(cs->axisList().size(), 1U);
EXPECT_EQ(cs->axisList()[0]->nameStr(), "Gravity-related height");
EXPECT_EQ(cs->axisList()[0]->direction(), AxisDirection::UP);
}
@@ -1995,7 +1995,7 @@ TEST(wkt_parse, vertcrs_with_ensemble) {
ASSERT_TRUE(crs != nullptr);
ASSERT_TRUE(crs->datum() == nullptr);
ASSERT_TRUE(crs->datumEnsemble() != nullptr);
- EXPECT_EQ(crs->datumEnsemble()->datums().size(), 2);
+ EXPECT_EQ(crs->datumEnsemble()->datums().size(), 2U);
}
// ---------------------------------------------------------------------------
@@ -2057,8 +2057,8 @@ TEST(wkt_parse, COMPOUNDCRS) {
auto crs = nn_dynamic_pointer_cast<CompoundCRS>(obj);
ASSERT_TRUE(crs != nullptr);
EXPECT_EQ(crs->nameStr(), "horizontal + vertical");
- EXPECT_EQ(crs->componentReferenceSystems().size(), 2);
- ASSERT_EQ(crs->identifiers().size(), 1);
+ EXPECT_EQ(crs->componentReferenceSystems().size(), 2U);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "code");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "codespace");
}
@@ -2212,8 +2212,8 @@ TEST(wkt_parse, COMPD_CS) {
auto crs = nn_dynamic_pointer_cast<CompoundCRS>(obj);
ASSERT_TRUE(crs != nullptr);
EXPECT_EQ(crs->nameStr(), "horizontal + vertical");
- EXPECT_EQ(crs->componentReferenceSystems().size(), 2);
- ASSERT_EQ(crs->identifiers().size(), 1);
+ EXPECT_EQ(crs->componentReferenceSystems().size(), 2U);
+ ASSERT_EQ(crs->identifiers().size(), 1U);
EXPECT_EQ(crs->identifiers()[0]->code(), "code");
EXPECT_EQ(*(crs->identifiers()[0]->codeSpace()), "codespace");
}
@@ -2265,11 +2265,11 @@ TEST(wkt_parse, COORDINATEOPERATION) {
auto transf = nn_dynamic_pointer_cast<Transformation>(obj);
ASSERT_TRUE(transf != nullptr);
EXPECT_EQ(transf->nameStr(), "transformationName");
- ASSERT_EQ(transf->identifiers().size(), 1);
+ ASSERT_EQ(transf->identifiers().size(), 1U);
EXPECT_EQ(transf->identifiers()[0]->code(), "codeTransformation");
EXPECT_EQ(*(transf->identifiers()[0]->codeSpace()),
"codeSpaceTransformation");
- ASSERT_EQ(transf->coordinateOperationAccuracies().size(), 1);
+ ASSERT_EQ(transf->coordinateOperationAccuracies().size(), 1U);
EXPECT_EQ(transf->coordinateOperationAccuracies()[0]->value(), "0.1");
EXPECT_EQ(transf->sourceCRS()->nameStr(),
GeographicCRS::EPSG_4326->nameStr());
@@ -2279,7 +2279,7 @@ TEST(wkt_parse, COORDINATEOPERATION) {
EXPECT_EQ(transf->interpolationCRS()->nameStr(),
GeographicCRS::EPSG_4979->nameStr());
EXPECT_EQ(transf->method()->nameStr(), "operationMethodName");
- EXPECT_EQ(transf->parameterValues().size(), 1);
+ EXPECT_EQ(transf->parameterValues().size(), 1U);
}
// ---------------------------------------------------------------------------
@@ -2339,10 +2339,10 @@ TEST(wkt_parse, CONCATENATEDOPERATION) {
auto concat = nn_dynamic_pointer_cast<ConcatenatedOperation>(obj);
ASSERT_TRUE(concat != nullptr);
EXPECT_EQ(concat->nameStr(), "name");
- ASSERT_EQ(concat->identifiers().size(), 1);
+ ASSERT_EQ(concat->identifiers().size(), 1U);
EXPECT_EQ(concat->identifiers()[0]->code(), "code");
EXPECT_EQ(*(concat->identifiers()[0]->codeSpace()), "codeSpace");
- ASSERT_EQ(concat->operations().size(), 2);
+ ASSERT_EQ(concat->operations().size(), 2U);
ASSERT_EQ(concat->operations()[0]->nameStr(), transf_1->nameStr());
ASSERT_EQ(concat->operations()[1]->nameStr(), transf_2->nameStr());
ASSERT_TRUE(concat->sourceCRS() != nullptr);
@@ -3069,7 +3069,7 @@ TEST(wkt_parse, WKT1_VERT_DATUM_EXTENSION) {
"EGM2008 geoid height to WGS84 ellipsoidal height");
EXPECT_EQ(crs->transformation()->method()->nameStr(),
"GravityRelatedHeight to Geographic3D");
- ASSERT_EQ(crs->transformation()->parameterValues().size(), 1);
+ ASSERT_EQ(crs->transformation()->parameterValues().size(), 1U);
{
const auto &opParamvalue =
nn_dynamic_pointer_cast<OperationParameterValue>(
@@ -3121,7 +3121,7 @@ TEST(wkt_parse, WKT1_DATUM_EXTENSION) {
EXPECT_EQ(crs->transformation()->nameStr(),
"International 1909 (Hayford) to WGS84");
EXPECT_EQ(crs->transformation()->method()->nameStr(), "NTv2");
- ASSERT_EQ(crs->transformation()->parameterValues().size(), 1);
+ ASSERT_EQ(crs->transformation()->parameterValues().size(), 1U);
{
const auto &opParamvalue =
nn_dynamic_pointer_cast<OperationParameterValue>(
@@ -3424,7 +3424,7 @@ TEST(wkt_parse, dateTimeTemporalCRS_WKT2) {
EXPECT_EQ(tdatum->calendar(), "proleptic Gregorian");
EXPECT_TRUE(nn_dynamic_pointer_cast<DateTimeTemporalCS>(
crs->coordinateSystem()) != nullptr);
- ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 1);
+ ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 1U);
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->unit().type(),
UnitOfMeasure::Type::NONE);
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->unit().name(), "");
@@ -3451,7 +3451,7 @@ TEST(wkt_parse, dateTimeTemporalCRS_WKT2_2018) {
EXPECT_EQ(tdatum->calendar(), "proleptic Gregorian");
EXPECT_TRUE(nn_dynamic_pointer_cast<DateTimeTemporalCS>(
crs->coordinateSystem()) != nullptr);
- ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 1);
+ ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 1U);
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->unit().type(),
UnitOfMeasure::Type::NONE);
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->unit().name(), "");
@@ -3478,7 +3478,7 @@ TEST(wkt_parse, temporalCountCRSWithConvFactor_WKT2_2018) {
EXPECT_EQ(tdatum->calendar(), "proleptic Gregorian");
EXPECT_TRUE(nn_dynamic_pointer_cast<TemporalCountCS>(
crs->coordinateSystem()) != nullptr);
- ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 1);
+ ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 1U);
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->unit().name(),
"milliseconds (ms)");
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->unit().conversionToSI(),
@@ -3506,7 +3506,7 @@ TEST(wkt_parse, temporalCountCRSWithoutConvFactor_WKT2_2018) {
EXPECT_EQ(tdatum->temporalOrigin().toString(), "1979-12-29T00Z");
EXPECT_TRUE(nn_dynamic_pointer_cast<TemporalCountCS>(
crs->coordinateSystem()) != nullptr);
- ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 1);
+ ASSERT_EQ(crs->coordinateSystem()->axisList().size(), 1U);
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->unit().name(), "hour");
EXPECT_EQ(crs->coordinateSystem()->axisList()[0]->unit().conversionToSI(),
0.0);
@@ -3533,7 +3533,7 @@ TEST(wkt_parse, temporalMeasureCRSWithoutConvFactor_WKT2_2018) {
EXPECT_TRUE(nn_dynamic_pointer_cast<TemporalMeasureCS>(
crs->coordinateSystem()) != nullptr);
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 1);
+ ASSERT_EQ(cs->axisList().size(), 1U);
auto axis = cs->axisList()[0];
EXPECT_EQ(axis->nameStr(), "Decimal years");
EXPECT_EQ(axis->unit().name(), "year");
@@ -3592,7 +3592,7 @@ TEST(wkt_parse, ENGCRS) {
EXPECT_EQ(crs->nameStr(), "Engineering CRS");
EXPECT_EQ(crs->datum()->nameStr(), "Engineering datum");
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 2);
+ ASSERT_EQ(cs->axisList().size(), 2U);
}
// ---------------------------------------------------------------------------
@@ -3617,7 +3617,7 @@ TEST(wkt_parse, ENGINEERINGCRS) {
EXPECT_EQ(crs->nameStr(), "Engineering CRS");
EXPECT_EQ(crs->datum()->nameStr(), "Engineering datum");
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 2);
+ ASSERT_EQ(cs->axisList().size(), 2U);
}
// ---------------------------------------------------------------------------
@@ -3632,7 +3632,7 @@ TEST(wkt_parse, LOCAL_CS_short) {
EXPECT_EQ(crs->nameStr(), "Engineering CRS");
EXPECT_FALSE(!crs->datum()->nameStr().empty());
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 2);
+ ASSERT_EQ(cs->axisList().size(), 2U);
EXPECT_EQ(
crs->exportToWKT(
@@ -3655,7 +3655,7 @@ TEST(wkt_parse, LOCAL_CS_long_one_axis) {
EXPECT_EQ(crs->nameStr(), "Engineering CRS");
EXPECT_EQ(crs->datum()->nameStr(), "Engineering datum");
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 1);
+ ASSERT_EQ(cs->axisList().size(), 1U);
}
// ---------------------------------------------------------------------------
@@ -3674,7 +3674,7 @@ TEST(wkt_parse, LOCAL_CS_long_two_axis) {
EXPECT_EQ(crs->nameStr(), "Engineering CRS");
EXPECT_EQ(crs->datum()->nameStr(), "Engineering datum");
auto cs = crs->coordinateSystem();
- ASSERT_EQ(cs->axisList().size(), 2);
+ ASSERT_EQ(cs->axisList().size(), 2U);
}
// ---------------------------------------------------------------------------
@@ -3728,7 +3728,7 @@ TEST(wkt_parse, PARAMETRICCRS) {
EXPECT_EQ(crs->datum()->nameStr(), "Mean Sea Level");
auto cs = crs->coordinateSystem();
EXPECT_TRUE(nn_dynamic_pointer_cast<ParametricCS>(cs) != nullptr);
- ASSERT_EQ(cs->axisList().size(), 1);
+ ASSERT_EQ(cs->axisList().size(), 1U);
auto axis = cs->axisList()[0];
EXPECT_EQ(axis->nameStr(), "Pressure");
EXPECT_EQ(axis->unit().name(), "HectoPascal");
@@ -3858,12 +3858,12 @@ TEST(wkt_parse, ensemble) {
auto ensemble = nn_dynamic_pointer_cast<DatumEnsemble>(obj);
ASSERT_TRUE(ensemble != nullptr);
- ASSERT_EQ(ensemble->datums().size(), 2);
+ ASSERT_EQ(ensemble->datums().size(), 2U);
auto firstDatum =
nn_dynamic_pointer_cast<GeodeticReferenceFrame>(ensemble->datums()[0]);
ASSERT_TRUE(firstDatum != nullptr);
EXPECT_EQ(firstDatum->nameStr(), "World Geodetic System 1984");
- ASSERT_EQ(firstDatum->identifiers().size(), 1);
+ ASSERT_EQ(firstDatum->identifiers().size(), 1U);
EXPECT_EQ(firstDatum->identifiers()[0]->code(), "6326");
EXPECT_EQ(*(firstDatum->identifiers()[0]->codeSpace()), "EPSG");
@@ -3884,7 +3884,7 @@ TEST(wkt_parse, ensemble_vdatum) {
auto ensemble = nn_dynamic_pointer_cast<DatumEnsemble>(obj);
ASSERT_TRUE(ensemble != nullptr);
- ASSERT_EQ(ensemble->datums().size(), 2);
+ ASSERT_EQ(ensemble->datums().size(), 2U);
auto firstDatum =
nn_dynamic_pointer_cast<VerticalReferenceFrame>(ensemble->datums()[0]);
ASSERT_TRUE(firstDatum != nullptr);
diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp
index e855a818..103b856c 100644
--- a/test/unit/test_operation.cpp
+++ b/test/unit/test_operation.cpp
@@ -502,7 +502,7 @@ TEST(operation, concatenated_operation) {
auto inv_as_concat = nn_dynamic_pointer_cast<ConcatenatedOperation>(inv);
ASSERT_TRUE(inv_as_concat != nullptr);
- ASSERT_EQ(inv_as_concat->operations().size(), 2);
+ ASSERT_EQ(inv_as_concat->operations().size(), 2U);
EXPECT_EQ(inv_as_concat->operations()[0]->nameStr(),
"Inverse of transformationName");
EXPECT_EQ(inv_as_concat->operations()[1]->nameStr(),
@@ -663,7 +663,7 @@ TEST(operation, transformation_createPositionVector) {
PositionalAccuracy::create("100")});
EXPECT_TRUE(transf->validateParameters().empty());
- ASSERT_EQ(transf->coordinateOperationAccuracies().size(), 1);
+ ASSERT_EQ(transf->coordinateOperationAccuracies().size(), 1U);
auto expected = std::vector<double>{1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0};
EXPECT_EQ(transf->getTOWGS84Parameters(), expected);
@@ -678,7 +678,7 @@ TEST(operation, transformation_createPositionVector) {
"+v_3");
auto inv_transf = transf->inverse();
- ASSERT_EQ(inv_transf->coordinateOperationAccuracies().size(), 1);
+ ASSERT_EQ(inv_transf->coordinateOperationAccuracies().size(), 1U);
EXPECT_EQ(transf->sourceCRS()->nameStr(),
inv_transf->targetCRS()->nameStr());
@@ -747,7 +747,7 @@ TEST(operation, transformation_createCoordinateFrameRotation) {
"+v_3");
auto inv_transf = transf->inverse();
- ASSERT_EQ(inv_transf->coordinateOperationAccuracies().size(), 0);
+ ASSERT_EQ(inv_transf->coordinateOperationAccuracies().size(), 0U);
EXPECT_EQ(transf->sourceCRS()->nameStr(),
inv_transf->targetCRS()->nameStr());
@@ -3137,7 +3137,7 @@ TEST(operation, webmerc_import_from_GDAL_wkt1_with_EPSG_code) {
auto obj = WKTParser().createFromWKT(wkt1);
auto crs = nn_dynamic_pointer_cast<ProjectedCRS>(obj);
ASSERT_TRUE(crs != nullptr);
- EXPECT_EQ(crs->identifiers().size(), 1);
+ EXPECT_EQ(crs->identifiers().size(), 1U);
}
// ---------------------------------------------------------------------------
@@ -4189,7 +4189,7 @@ TEST(operation, geogCRS_to_geogCRS_context_default) {
authFactory->createCoordinateReferenceSystem("4179"), // Pulkovo 42
authFactory->createCoordinateReferenceSystem("4258"), // ETRS89
ctxt);
- ASSERT_EQ(list.size(), 3);
+ ASSERT_EQ(list.size(), 3U);
// Romania has a larger area than Poland (given our approx formula)
EXPECT_EQ(list[0]->getEPSGCode(), 15994); // Romania - 3m
EXPECT_EQ(list[1]->getEPSGCode(), 1644); // Poland - 1m
@@ -4212,7 +4212,7 @@ TEST(operation, geogCRS_to_geogCRS_context_default) {
auto list = CoordinateOperationFactory::create()->createOperations(
authFactory->createCoordinateReferenceSystem("4258"),
authFactory->createCoordinateReferenceSystem("4179"), ctxt);
- ASSERT_EQ(list.size(), 3);
+ ASSERT_EQ(list.size(), 3U);
// Romania has a larger area than Poland (given our approx formula)
EXPECT_EQ(list[0]->nameStr(),
"Inverse of Pulkovo 1942(58) to ETRS89 (4)"); // Romania - 3m
@@ -4269,7 +4269,7 @@ TEST(operation, geogCRS_to_geogCRS_context_filter_accuracy) {
auto list = CoordinateOperationFactory::create()->createOperations(
authFactory->createCoordinateReferenceSystem("4179"),
authFactory->createCoordinateReferenceSystem("4258"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->getEPSGCode(), 1644); // Poland - 1m
}
{
@@ -4281,7 +4281,7 @@ TEST(operation, geogCRS_to_geogCRS_context_filter_accuracy) {
auto list = CoordinateOperationFactory::create()->createOperations(
authFactory->createCoordinateReferenceSystem("4179"),
authFactory->createCoordinateReferenceSystem("4258"), ctxt);
- ASSERT_EQ(list.size(), 0);
+ ASSERT_EQ(list.size(), 0U);
}
}
@@ -4299,7 +4299,7 @@ TEST(operation, geogCRS_to_geogCRS_context_filter_bbox) {
auto list = CoordinateOperationFactory::create()->createOperations(
authFactory->createCoordinateReferenceSystem("4179"),
authFactory->createCoordinateReferenceSystem("4258"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->getEPSGCode(), 15994); // Romania - 3m
}
{
@@ -4310,7 +4310,7 @@ TEST(operation, geogCRS_to_geogCRS_context_filter_bbox) {
auto list = CoordinateOperationFactory::create()->createOperations(
authFactory->createCoordinateReferenceSystem("4179"),
authFactory->createCoordinateReferenceSystem("4258"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->getEPSGCode(), 15994); // Romania - 3m
}
{
@@ -4321,7 +4321,7 @@ TEST(operation, geogCRS_to_geogCRS_context_filter_bbox) {
auto list = CoordinateOperationFactory::create()->createOperations(
authFactory->createCoordinateReferenceSystem("4179"),
authFactory->createCoordinateReferenceSystem("4258"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(
list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"");
@@ -4338,7 +4338,7 @@ TEST(operation, geogCRS_to_geogCRS_context_incompatible_area) {
authFactory->createCoordinateReferenceSystem("4267"), // NAD27
authFactory->createCoordinateReferenceSystem("4258"), // ETRS 89
ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"");
}
@@ -4356,7 +4356,7 @@ TEST(operation, geogCRS_to_geogCRS_context_inverse_needed) {
authFactory->createCoordinateReferenceSystem("4275"), // NTF
authFactory->createCoordinateReferenceSystem("4258"), // ETRS89
ctxt);
- ASSERT_EQ(list.size(), 3);
+ ASSERT_EQ(list.size(), 3U);
EXPECT_EQ(
list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=push +v_3 +step +proj=axisswap "
@@ -4388,7 +4388,7 @@ TEST(operation, geogCRS_to_geogCRS_context_inverse_needed) {
authFactory->createCoordinateReferenceSystem("4275"), // NTF
authFactory->createCoordinateReferenceSystem("4258"), // ETRS89
ctxt);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
EXPECT_EQ(
list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
@@ -4403,7 +4403,7 @@ TEST(operation, geogCRS_to_geogCRS_context_inverse_needed) {
authFactory->createCoordinateReferenceSystem("4258"), // ETRS89
authFactory->createCoordinateReferenceSystem("4275"), // NTF
ctxt);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
EXPECT_EQ(
list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
@@ -4429,7 +4429,7 @@ TEST(operation, geogCRS_to_geogCRS_context_ntv1_ntv2_ctable2) {
authFactory->createCoordinateReferenceSystem("4267"), // NAD27
authFactory->createCoordinateReferenceSystem("4269"), // NAD83
ctxt);
- ASSERT_EQ(list.size(), 7);
+ ASSERT_EQ(list.size(), 7U);
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
"+proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift "
@@ -4461,7 +4461,7 @@ TEST(operation, vertCRS_to_geogCRS_context) {
"3855"), // EGM2008 height
authFactory->createCoordinateReferenceSystem("4979"), // WGS 84
ctxt);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
EXPECT_EQ(list[1]->exportToPROJString(
PROJStringFormatter::create(
PROJStringFormatter::Convention::PROJ_5,
@@ -4477,7 +4477,7 @@ TEST(operation, vertCRS_to_geogCRS_context) {
"3855"), // EGM2008 height
authFactory->createCoordinateReferenceSystem("4979"), // WGS 84
ctxt);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
EXPECT_EQ(
list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=vgridshift +grids=egm08_25.gtx +multiplier=1");
@@ -4490,7 +4490,7 @@ TEST(operation, vertCRS_to_geogCRS_context) {
authFactory->createCoordinateReferenceSystem(
"3855"), // EGM2008 height
ctxt);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
EXPECT_EQ(
list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +inv +proj=vgridshift +grids=egm08_25.gtx "
@@ -4554,7 +4554,7 @@ TEST(operation, geogCRS_to_geogCRS_longitude_rotation_context) {
authFactory->createCoordinateReferenceSystem("4807"), // NTF(Paris)
authFactory->createCoordinateReferenceSystem("4275"), // NTF
ctxt);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
EXPECT_EQ(list[0]->nameStr(), "NTF (Paris) to NTF (1)");
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
@@ -4581,7 +4581,7 @@ TEST(operation, geogCRS_to_geogCRS_context_concatenated_operation) {
authFactory->createCoordinateReferenceSystem("4807"), // NTF(Paris)
authFactory->createCoordinateReferenceSystem("4171"), // RGF93
ctxt);
- ASSERT_EQ(list.size(), 3);
+ ASSERT_EQ(list.size(), 3U);
EXPECT_EQ(list[0]->nameStr(), "NTF (Paris) to RGF93 (2)");
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
@@ -4593,7 +4593,7 @@ TEST(operation, geogCRS_to_geogCRS_context_concatenated_operation) {
EXPECT_TRUE(nn_dynamic_pointer_cast<ConcatenatedOperation>(list[0]) !=
nullptr);
auto grids = list[0]->gridsNeeded(DatabaseContext::create());
- EXPECT_EQ(grids.size(), 1);
+ EXPECT_EQ(grids.size(), 1U);
}
// ---------------------------------------------------------------------------
@@ -4625,7 +4625,7 @@ TEST(operation, geogCRS_to_geogCRS_geographic_offset_context) {
authFactory->createCoordinateReferenceSystem("4120"), // NTF(Paris)
authFactory->createCoordinateReferenceSystem("4121"), // NTF
ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(), "Greek to GGRS87 (1)");
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
@@ -4644,7 +4644,7 @@ TEST(operation, geogCRS_to_geogCRS_CH1903_to_CH1903plus_context) {
authFactory->createCoordinateReferenceSystem("4149"), // CH1903
authFactory->createCoordinateReferenceSystem("4150"), // CH1903+
ctxt);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
EXPECT_EQ(list[0]->nameStr(),
"CH1903 to ETRS89 (1) + Inverse of CH1903+ to ETRS89 (1)");
@@ -4684,7 +4684,7 @@ TEST(operation, geogCRS_to_geogCRS_init_IGNF_to_init_IGNF_context) {
auto ctxt = CoordinateOperationContext::create(authFactory, nullptr, 0.0);
auto list = CoordinateOperationFactory::create()->createOperations(
NN_CHECK_ASSERT(sourceCRS), NN_CHECK_ASSERT(targetCRS), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"NOUVELLE TRIANGULATION DE LA FRANCE (NTF) vers RGF93 (ETRS89)");
@@ -4810,7 +4810,7 @@ TEST(operation, geocentricCRS_to_geogCRS_same_datum_context) {
authFactory->createCoordinateReferenceSystem("4326"),
// WGS84 geocentric
authFactory->createCoordinateReferenceSystem("4978"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"Conversion from WGS 84 (geog2D) to WGS 84 (geocentric)");
@@ -4842,7 +4842,7 @@ TEST(operation, geocentricCRS_to_geogCRS_same_datum_context_all_auth) {
authFactoryEPSG->createCoordinateReferenceSystem("4326"),
// WGS84 geocentric
authFactoryEPSG->createCoordinateReferenceSystem("4978"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"Conversion from WGS 84 (geog2D) to WGS 84 (geocentric)");
@@ -4859,7 +4859,7 @@ TEST(operation, geocentricCRS_to_geocentricCRS_different_datum_context) {
authFactory->createCoordinateReferenceSystem("4919"),
// ITRF2005 (geocentric)
authFactory->createCoordinateReferenceSystem("4896"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(), "ITRF2000 to ITRF2005 (1)");
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=helmert +x=-0.0001 "
@@ -4878,7 +4878,7 @@ TEST(operation, geogCRS_geocentricCRS_same_datum_to_context) {
// WGS84 geocentric
authFactory->createCoordinateReferenceSystem("4978"),
authFactory->createCoordinateReferenceSystem("4326"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"Conversion from WGS 84 (geocentric) to WGS 84 (geog2D)");
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
@@ -4899,7 +4899,7 @@ TEST(operation,
authFactory->createCoordinateReferenceSystem("7909"),
// ITRF2005 (geog3D)
authFactory->createCoordinateReferenceSystem("7910"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"Conversion from ITRF2000 (geog3D) to ITRF2000 (geocentric) + "
"ITRF2000 to ITRF2005 (1) + "
@@ -4926,7 +4926,7 @@ TEST(operation, geogCRS_to_geocentricCRS_different_datum_context) {
authFactory->createCoordinateReferenceSystem("7909"),
// ITRF2005 (geocentric)
authFactory->createCoordinateReferenceSystem("4896"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"Conversion from ITRF2000 (geog3D) to ITRF2000 (geocentric) + "
"ITRF2000 to ITRF2005 (1)");
@@ -4950,7 +4950,7 @@ TEST(operation, geocentricCRS_to_geogCRS_different_datum_context) {
authFactory->createCoordinateReferenceSystem("4919"),
// ITRF2005 (geog3D)
authFactory->createCoordinateReferenceSystem("7910"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"ITRF2000 to ITRF2005 (1) + "
"Conversion from ITRF2005 (geocentric) to ITRF2005 (geog3D)");
@@ -4976,7 +4976,7 @@ TEST(operation, esri_projectedCRS_to_geogCRS_with_ITRF_intermediate_context) {
authFactoryESRI->createCoordinateReferenceSystem("103501"),
// ITRF2005 (geog3D)
authFactoryEPSG->createCoordinateReferenceSystem("7910"), ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"Inverse of NAD_1983_CORS96_StatePlane_North_Carolina_"
"FIPS_3200_Ft_US + "
@@ -5074,7 +5074,7 @@ TEST(operation, geogCRS_longlat_to_geogCS_latlong_database) {
AuthorityFactory::create(DatabaseContext::create(), "EPSG")
->createCoordinateReferenceSystem("4326"),
ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=axisswap +order=2,1");
}
@@ -5117,11 +5117,11 @@ TEST(operation,
authFactory->createCoordinateReferenceSystem("4807"), // NTF(Paris)
authFactory->createCoordinateReferenceSystem("32631"), // UTM31 WGS84
ctxt);
- ASSERT_EQ(list.size(), 4);
+ ASSERT_EQ(list.size(), 4U);
EXPECT_EQ(
list[0]->nameStr(),
"NTF (Paris) to NTF (1) + Inverse of WGS 84 to NTF (3) + UTM zone 31N");
- ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1);
+ ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1U);
EXPECT_EQ(list[0]->coordinateOperationAccuracies()[0]->value(), "1");
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +proj=axisswap +order=2,1 +step "
@@ -5195,11 +5195,11 @@ TEST(operation, projCRS_to_projCRS_context_compatible_area) {
authFactory->createCoordinateReferenceSystem(
"2171"), // Pulkovo 42 Poland I
ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"Inverse of UTM zone 34N + Inverse of Pulkovo 1942(58) to WGS 84 "
"(1) + Poland zone I");
- ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1);
+ ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1U);
EXPECT_EQ(list[0]->coordinateOperationAccuracies()[0]->value(), "1");
}
@@ -5214,11 +5214,11 @@ TEST(operation, projCRS_to_projCRS_context_compatible_area_bis) {
"3844"), // Pulkovo 42 Stereo 70 (Romania)
authFactory->createCoordinateReferenceSystem("32634"), // UTM 34
ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(), "Inverse of Stereo 70 + "
"Pulkovo 1942(58) to WGS 84 "
"(19) + UTM zone 34N");
- ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1);
+ ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1U);
EXPECT_EQ(list[0]->coordinateOperationAccuracies()[0]->value(), "3");
}
@@ -5233,11 +5233,11 @@ TEST(operation, projCRS_to_projCRS_context_one_incompatible_area) {
authFactory->createCoordinateReferenceSystem(
"2171"), // Pulkovo 42 Poland I
ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(),
"Inverse of UTM zone 31N + Inverse of Pulkovo 1942(58) to WGS 84 "
"(1) + Poland zone I");
- ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1);
+ ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1U);
EXPECT_EQ(list[0]->coordinateOperationAccuracies()[0]->value(), "1");
}
@@ -5251,9 +5251,9 @@ TEST(operation, projCRS_to_projCRS_context_incompatible_areas) {
authFactory->createCoordinateReferenceSystem("32631"), // UTM 31
authFactory->createCoordinateReferenceSystem("32633"), // UTM 33
ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->nameStr(), "Inverse of UTM zone 31N + UTM zone 33N");
- ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1);
+ ASSERT_EQ(list[0]->coordinateOperationAccuracies().size(), 1U);
EXPECT_EQ(list[0]->coordinateOperationAccuracies()[0]->value(), "0");
}
@@ -5270,7 +5270,7 @@ TEST(operation, projCRS_to_projCRS_north_pole_inverted_axis) {
AuthorityFactory::create(DatabaseContext::create(), "EPSG")
->createCoordinateReferenceSystem("5041"),
ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=axisswap +order=2,1");
}
@@ -5288,7 +5288,7 @@ TEST(operation, projCRS_to_projCRS_south_pole_inverted_axis) {
AuthorityFactory::create(DatabaseContext::create(), "EPSG")
->createCoordinateReferenceSystem("5042"),
ctxt);
- ASSERT_EQ(list.size(), 1);
+ ASSERT_EQ(list.size(), 1U);
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=axisswap +order=2,1");
}
@@ -5725,7 +5725,7 @@ TEST(operation, transformation_height_to_PROJ_string) {
"+proj=vgridshift +grids=egm08_25.gtx +multiplier=1");
auto grids = transf->gridsNeeded(DatabaseContext::create());
- ASSERT_EQ(grids.size(), 1);
+ ASSERT_EQ(grids.size(), 1U);
auto gridDesc = *(grids.begin());
EXPECT_EQ(gridDesc.shortName, "egm08_25.gtx");
EXPECT_EQ(gridDesc.packageName, "proj-datumgrid-world");
@@ -5968,7 +5968,7 @@ TEST(operation, compoundCRS_with_boundGeogCRS_and_boundVerticalCRS_to_geogCRS) {
"+order=2,1");
auto grids = op->gridsNeeded(DatabaseContext::create());
- EXPECT_EQ(grids.size(), 1);
+ EXPECT_EQ(grids.size(), 1U);
auto opInverse = CoordinateOperationFactory::create()->createOperation(
GeographicCRS::EPSG_4979, compound);
@@ -6197,7 +6197,7 @@ TEST(operation, IGNF_LAMB1_TO_EPSG_4326) {
AuthorityFactory::create(DatabaseContext::create(), "EPSG")
->createCoordinateReferenceSystem("4326"),
ctxt);
- ASSERT_EQ(list.size(), 2);
+ ASSERT_EQ(list.size(), 2U);
EXPECT_EQ(list[0]->exportToPROJString(PROJStringFormatter::create().get()),
"+proj=pipeline +step +inv +proj=lcc +lat_1=49.5 +lat_0=49.5 "