Skip to content

Commit

Permalink
Update a test result for proj 6
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 20, 2019
1 parent c35d898 commit 0c05568
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/src/core/testqgsdistancearea.cpp
Expand Up @@ -120,18 +120,29 @@ void TestQgsDistanceArea::cache()
// warm cache
QVERIFY( da.setEllipsoid( QStringLiteral( "Ganymede2000" ) ) );
QVERIFY( da.willUseEllipsoid() );
// different definition under proj 6, neither is incorrect!
#if PROJ_VERSION_MAJOR>=6
QCOMPARE( da.ellipsoidSemiMajor(), 2632345.0 );
QCOMPARE( da.ellipsoidSemiMinor(), 2632345.0 );
#else
QCOMPARE( da.ellipsoidSemiMajor(), 2632400.0 );
QCOMPARE( da.ellipsoidSemiMinor(), 2632350.0 );
QCOMPARE( da.ellipsoidInverseFlattening(), 52648.0 );
#endif
QCOMPARE( da.ellipsoid(), QStringLiteral( "Ganymede2000" ) );

// a second time, so ellipsoid is fetched from cache
QgsDistanceArea da2;
QVERIFY( da2.setEllipsoid( QStringLiteral( "Ganymede2000" ) ) );
QVERIFY( da2.willUseEllipsoid() );
#if PROJ_VERSION_MAJOR>=6
QCOMPARE( da2.ellipsoidSemiMajor(), 2632345.0 );
QCOMPARE( da2.ellipsoidSemiMinor(), 2632345.0 );
#else
QCOMPARE( da2.ellipsoidSemiMajor(), 2632400.0 );
QCOMPARE( da2.ellipsoidSemiMinor(), 2632350.0 );
QCOMPARE( da2.ellipsoidInverseFlattening(), 52648.0 );
#endif
QCOMPARE( da2.ellipsoid(), QStringLiteral( "Ganymede2000" ) );

// using parameters
Expand Down

0 comments on commit 0c05568

Please sign in to comment.