Skip to content
Permalink
Browse files

Added unit test to check correct outcome of axisInverted()

  • Loading branch information
wonder-sk committed Feb 20, 2014
1 parent c784c09 commit 55cb04c52cbbfe6eba9e3d29b2859ca92cad3008
Showing with 17 additions and 0 deletions.
  1. +17 −0 tests/src/core/testqgscoordinatereferencesystem.cpp
@@ -60,6 +60,7 @@ class TestQgsCoordinateReferenceSystem: public QObject
void geographicFlag();
void mapUnits();
void setValidationHint();
void axisInverted();
private:
void debugPrint( QgsCoordinateReferenceSystem &theCrs );
// these used by createFromESRIWkt()
@@ -410,6 +411,22 @@ void TestQgsCoordinateReferenceSystem::setValidationHint()
debugPrint( myCrs );
}

void TestQgsCoordinateReferenceSystem::axisInverted()
{
// this is used by WMS 1.3 to determine whether to switch axes or not

QgsCoordinateReferenceSystem crs;
crs.createFromOgcWmsCrs( "EPSG:4326" ); // WGS 84 with inverted axes
QVERIFY( crs.axisInverted() );

crs.createFromOgcWmsCrs( "CRS:84" ); // WGS 84 without inverted axes
QVERIFY( !crs.axisInverted() );

crs.createFromOgcWmsCrs( "EPSG:32633" ); // "WGS 84 / UTM zone 33N" - projected CRS without invertex axes
QVERIFY( !crs.axisInverted() );
}


void TestQgsCoordinateReferenceSystem::debugPrint(
QgsCoordinateReferenceSystem &theCrs )
{

0 comments on commit 55cb04c

Please sign in to comment.
You can’t perform that action at this time.