Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix disabled, broken test
  • Loading branch information
nyalldawson committed Jun 5, 2019
1 parent 011f0ae commit 67664e4
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/src/core/testqgsinvertedpolygonrenderer.cpp
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 67664e4

Please sign in to comment.