Skip to content

Commit

Permalink
Fix disabled, broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 4, 2019
1 parent 5de8b30 commit a97de95
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/src/core/testqgsinvertedpolygonrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ class TestQgsInvertedPolygon : public QObject
void checkSymbolItem();
void preprocess();
void projectionTest();
#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_MAJOR >= 2
void curvedPolygons();
#endif

private:
bool mTestHasError = false ;
Expand Down Expand Up @@ -153,26 +151,24 @@ void TestQgsInvertedPolygon::projectionTest()
QVERIFY( imageCheck( "inverted_polys_projection", &extent ) );
QVERIFY( setQml( mpPolysLayer, "inverted_polys_preprocess.qml" ) );
QVERIFY( imageCheck( "inverted_polys_projection2", &extent ) );
mMapSettings.setDestinationCrs( mpPolysLayer->crs() );
}

#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_MAJOR >= 2
// This test relies on GDAL support of curved polygons
void TestQgsInvertedPolygon::curvedPolygons()
{
QString myCurvedPolysFileName = mTestDataDir + "curved_polys.gpkg";
QFileInfo myCurvedPolyFileInfo( myCurvedPolysFileName );
QgsVectorLayer *curvedLayer = new QgsVectorLayer( myCurvedPolyFileInfo.filePath() + "|layername=polys",
myCurvedPolyFileInfo.completeBaseName(), "ogr" );
curvedLayer->setSimplifyMethod( simplifyMethod );
QgsProject::instance()->addMapLayers( QList<QgsMapLayer *>() << curvedLayer );

mReport += "<h2>Inverted polygon renderer, curved polygons test</h2>\n";
mMapSettings.setLayers( QStringList() << curvedLayer->id() );
QVERIFY( setQml( mpCurvedPolysLayer, "inverted_polys_single.qml" ) );
mMapSettings.setLayers( QList< QgsMapLayer * >() << curvedLayer );
QVERIFY( setQml( curvedLayer, "inverted_polys_single.qml" ) );
QVERIFY( imageCheck( "inverted_polys_curved" ) );
mMapSettings.setLayers( QStringList() << curvedLayer->id() );
mMapSettings.setLayers( QList< QgsMapLayer * >() << mpPolysLayer );
}
#endif

//
// Private helper functions not called directly by CTest
Expand Down

0 comments on commit a97de95

Please sign in to comment.