38
38
#include < qgsapplication.h>
39
39
#include < qgsproviderregistry.h>
40
40
#include < qgsmaplayerregistry.h>
41
- #include " qgssinglesymbolrendererv2.h"
42
41
43
42
// qgs unit test utility class
44
43
#include " qgsrenderchecker.h"
@@ -55,9 +54,8 @@ class TestQgsMapRenderer : public QObject
55
54
public:
56
55
TestQgsMapRenderer ()
57
56
: mError ( QgsVectorFileWriter::NoError )
58
- , mMapSettings ( nullptr )
59
- , mpPolysLayer( nullptr )
60
- , mPointsLayer ( nullptr )
57
+ , mMapSettings ( 0 )
58
+ , mpPolysLayer( 0 )
61
59
{
62
60
}
63
61
@@ -81,18 +79,14 @@ class TestQgsMapRenderer : public QObject
81
79
void testFourAdjacentTiles_data ();
82
80
void testFourAdjacentTiles ();
83
81
84
- void testSymbolsOnEdgeOfExtent (); // tests that large symbols just outside the extent will be shown
85
-
86
82
private:
87
83
QString mEncoding ;
88
84
QgsVectorFileWriter::WriterError mError ;
89
85
QgsCoordinateReferenceSystem mCRS ;
90
86
QgsFields mFields ;
91
87
QgsMapSettings *mMapSettings ;
92
88
QgsMapLayer * mpPolysLayer;
93
- QgsVectorLayer* mPointsLayer ;
94
89
QString mReport ;
95
- bool imageCheck (QgsMapSettings mapSettings, const QString& theTestType);
96
90
};
97
91
98
92
@@ -189,14 +183,6 @@ void TestQgsMapRenderer::initTestCase()
189
183
mpPolysLayer = new QgsVectorLayer ( myPolyFileInfo.filePath (),
190
184
myPolyFileInfo.completeBaseName (), " ogr" );
191
185
QVERIFY ( mpPolysLayer->isValid () );
192
-
193
-
194
- QString pointFileName = myTestDataDir + " regular_points.geojson" ;
195
- QFileInfo pointFileInfo ( pointFileName );
196
- mPointsLayer = new QgsVectorLayer ( pointFileInfo.filePath (),
197
- pointFileInfo.completeBaseName (), " ogr" );
198
- QVERIFY ( mPointsLayer ->isValid () );
199
-
200
186
// Register the layer with the registry
201
187
QgsMapLayerRegistry::instance ()->addMapLayers ( QList<QgsMapLayer *>() << mpPolysLayer );
202
188
// add the test layer to the maprender
@@ -346,39 +332,6 @@ void TestQgsMapRenderer::testFourAdjacentTiles()
346
332
QVERIFY ( result );
347
333
}
348
334
349
- void TestQgsMapRenderer::testSymbolsOnEdgeOfExtent ()
350
- {
351
- mReport += " <h2>Large symbols on edge of extent</h2>\n " ;
352
-
353
- QgsMapSettings ms;
354
- ms.setLayers ( QStringList () << mPointsLayer ->id () );
355
- ms.setExtent ( mPointsLayer ->extent () );
356
- mMapSettings ->setDestinationCrs ( QgsCoordinateReferenceSystem ( " EPSG:3005" ) );
357
-
358
- // ms.setExtent( QgsRectangle ( 778780, 965073, 780900, 970333 ) );
359
-
360
- // BIG symbol
361
- QgsStringMap properties;
362
- properties.insert ( " color" , " 0,0,0,255" );
363
- properties.insert ( " name" , " circle" );
364
- properties.insert ( " size" , " 20.0" );
365
- properties.insert ( " outline_style" , " no" );
366
- QgsMarkerSymbolV2* pointSymbol = QgsMarkerSymbolV2::createSimple ( properties );
367
- mPointsLayer ->setRendererV2 ( new QgsSingleSymbolRendererV2 ( pointSymbol ) );
368
-
369
- QVERIFY ( imageCheck ( ms, " singlesymbol_orderby" ) );
370
- }
371
-
372
- bool TestQgsMapRenderer::imageCheck ( QgsMapSettings mapSettings, const QString& theTestType )
373
- {
374
- mapSettings.setOutputDpi ( 96 );
375
- QgsRenderChecker myChecker;
376
- myChecker.setControlName ( " expected_" + theTestType );
377
- myChecker.setMapSettings ( mapSettings );
378
- bool myResultFlag = myChecker.runTest ( theTestType, 30 );
379
- mReport += myChecker.report ();
380
- return myResultFlag;
381
- }
382
335
383
336
QTEST_MAIN ( TestQgsMapRenderer )
384
337
#include " testqgsmaprenderer.moc"
0 commit comments