diff options
Diffstat (limited to 'test/unit')
| -rw-r--r-- | test/unit/test_c_api.cpp | 6 | ||||
| -rw-r--r-- | test/unit/test_crs.cpp | 5 | ||||
| -rw-r--r-- | test/unit/test_operation.cpp | 8 |
3 files changed, 11 insertions, 8 deletions
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 42d00fa6..20f4180b 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -1146,7 +1146,7 @@ TEST_F(CApi, proj_obj_create_operations) { ASSERT_NE(res, nullptr); ObjListKeeper keeper_res(res); - EXPECT_EQ(proj_obj_list_get_count(res), 8); + EXPECT_EQ(proj_obj_list_get_count(res), 7); EXPECT_EQ(proj_obj_list_get(m_ctxt, res, -1), nullptr); EXPECT_EQ(proj_obj_list_get(m_ctxt, res, proj_obj_list_get_count(res)), @@ -1247,7 +1247,7 @@ TEST_F(CApi, proj_obj_create_operations_with_pivot) { // Restrict pivot to JGD2000 { - auto ctxt = proj_create_operation_factory_context(m_ctxt, nullptr); + auto ctxt = proj_create_operation_factory_context(m_ctxt, "any"); ASSERT_NE(ctxt, nullptr); ContextKeeper keeper_ctxt(ctxt); @@ -1263,7 +1263,7 @@ TEST_F(CApi, proj_obj_create_operations_with_pivot) { proj_obj_create_operations(m_ctxt, source_crs, target_crs, ctxt); ASSERT_NE(res, nullptr); ObjListKeeper keeper_res(res); - // includes 2 results from ESRI + // includes results from ESRI EXPECT_EQ(proj_obj_list_get_count(res), 5); auto op = proj_obj_list_get(m_ctxt, res, 0); ASSERT_NE(op, nullptr); diff --git a/test/unit/test_crs.cpp b/test/unit/test_crs.cpp index 44b84401..9c11ac4c 100644 --- a/test/unit/test_crs.cpp +++ b/test/unit/test_crs.cpp @@ -4841,6 +4841,11 @@ TEST(crs, crs_createBoundCRSToWGS84IfPossible) { "+proj=geocent +ellps=intl " "+towgs84=324.8,153.6,172.1,0,0,0,0 +units=m +no_defs"); } + { + auto crs = factory->createCoordinateReferenceSystem("4269"); // NAD83 + auto bound = crs->createBoundCRSToWGS84IfPossible(dbContext); + EXPECT_EQ(bound, crs); + } } // --------------------------------------------------------------------------- diff --git a/test/unit/test_operation.cpp b/test/unit/test_operation.cpp index 057f1717..e5734cd1 100644 --- a/test/unit/test_operation.cpp +++ b/test/unit/test_operation.cpp @@ -5941,7 +5941,7 @@ TEST(operation, IGNF_LAMB1_TO_EPSG_4326) { AuthorityFactory::create(DatabaseContext::create(), "EPSG") ->createCoordinateReferenceSystem("4326"), ctxt); - ASSERT_GE(list2.size(), 4U); + ASSERT_GE(list2.size(), 3U); EXPECT_EQ(replaceAll(list2[0]->exportToPROJString( PROJStringFormatter::create().get()), @@ -5950,10 +5950,8 @@ TEST(operation, IGNF_LAMB1_TO_EPSG_4326) { // The second entry in list2 (list2[1]) uses the // weird +pm=2.33720833333333 from "NTF (Paris) to NTF (2)" - // and the third one uses the ESRI geographic offset method with another - // value - // so skip to the 4th method - EXPECT_EQ(replaceAll(list2[3]->exportToPROJString( + // so skip to the 3th method + EXPECT_EQ(replaceAll(list2[2]->exportToPROJString( PROJStringFormatter::create().get()), "0.999877341", "0.99987734"), list[1]->exportToPROJString(PROJStringFormatter::create().get())); |
