From e8b2e2a36324006146406fb1fc89ce6ed863807f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 17 Feb 2019 19:40:38 +0100 Subject: Modify the default strategy of researching intermediate CRS to do it only if there is no direct transformation --- test/unit/test_factory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/unit/test_factory.cpp') diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 40728f96..ec59dcbc 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -1612,7 +1612,8 @@ class FactoryWithTmpDatabase : public ::testing::Test { { auto ctxt = CoordinateOperationContext::create(factory, nullptr, 0); - ctxt->setAllowUseIntermediateCRS(false); + ctxt->setAllowUseIntermediateCRS( + CoordinateOperationContext::IntermediateCRSUse::NEVER); res = CoordinateOperationFactory::create()->createOperations( srcCRS, targetCRS, ctxt); EXPECT_EQ(res.size(), 1U); -- cgit v1.2.3 From 1b272fc9ee5d25a0cb07d6d12df13c6a77eeb7f0 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 17 Feb 2019 20:52:46 +0100 Subject: tests: implement fuzzy proj string comparison in a few problematic test cases on non-x86 arch (fixes #1275) --- test/unit/test_factory.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/unit/test_factory.cpp') diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 40728f96..d5c82afb 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -28,6 +28,8 @@ #include "gtest_include.h" +#include "test_primitives.hpp" + #include "proj/common.hpp" #include "proj/coordinateoperation.hpp" #include "proj/coordinatesystem.hpp" @@ -991,10 +993,12 @@ TEST(factory, AuthorityFactory_test_uom_9110) { auto factory = AuthorityFactory::create(DatabaseContext::create(), "EPSG"); // This tests conversion from unit of measure EPSG:9110 DDD.MMSSsss auto crs = factory->createProjectedCRS("2172"); - EXPECT_EQ(crs->exportToPROJString(PROJStringFormatter::create().get()), - "+proj=sterea +lat_0=53.0019444444444 +lon_0=21.5027777777778 " - "+k=0.9998 +x_0=4603000 +y_0=5806000 +ellps=krass +units=m " - "+no_defs +type=crs"); + EXPECT_PRED_FORMAT2( + ComparePROJString, + crs->exportToPROJString(PROJStringFormatter::create().get()), + "+proj=sterea +lat_0=53.0019444444444 +lon_0=21.5027777777778 " + "+k=0.9998 +x_0=4603000 +y_0=5806000 +ellps=krass +units=m " + "+no_defs +type=crs"); } // --------------------------------------------------------------------------- -- cgit v1.2.3