Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a97de95

Browse files
committedJun 4, 2019
Fix disabled, broken test
1 parent 5de8b30 commit a97de95

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed
 

‎tests/src/core/testqgsinvertedpolygonrenderer.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ class TestQgsInvertedPolygon : public QObject
5454
void checkSymbolItem();
5555
void preprocess();
5656
void projectionTest();
57-
#if defined(GDAL_VERSION_NUM) && GDAL_VERSION_MAJOR >= 2
5857
void curvedPolygons();
59-
#endif
6058

6159
private:
6260
bool mTestHasError = false ;
@@ -153,26 +151,24 @@ void TestQgsInvertedPolygon::projectionTest()
153151
QVERIFY( imageCheck( "inverted_polys_projection", &extent ) );
154152
QVERIFY( setQml( mpPolysLayer, "inverted_polys_preprocess.qml" ) );
155153
QVERIFY( imageCheck( "inverted_polys_projection2", &extent ) );
154+
mMapSettings.setDestinationCrs( mpPolysLayer->crs() );
156155
}
157156

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

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

177173
//
178174
// Private helper functions not called directly by CTest

0 commit comments

Comments
 (0)
Please sign in to comment.