Skip to content

Commit

Permalink
More test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 26, 2019
1 parent f44c229 commit 322eb31
Show file tree
Hide file tree
Showing 25 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions tests/src/core/testqgslabelingengine.cpp
Expand Up @@ -25,7 +25,7 @@
#include <qgsvectorlayerdiagramprovider.h>
#include <qgsvectorlayerlabeling.h>
#include <qgsvectorlayerlabelprovider.h>
#include "qgsrenderchecker.h"
#include "qgsmultirenderchecker.h"
#include "qgsfontutils.h"
#include "qgsnullsymbolrenderer.h"
#include "pointset.h"
Expand Down Expand Up @@ -770,7 +770,7 @@ bool TestQgsLabelingEngine::imageCheck( const QString &testName, QImage &image,
{
//draw background
QImage imageWithBackground( image.width(), image.height(), QImage::Format_RGB32 );
QgsRenderChecker::drawBackground( &imageWithBackground );
QgsMultiRenderChecker::drawBackground( &imageWithBackground );
QPainter painter( &imageWithBackground );
painter.drawImage( 0, 0, image );
painter.end();
Expand All @@ -779,12 +779,12 @@ bool TestQgsLabelingEngine::imageCheck( const QString &testName, QImage &image,
QString tempDir = QDir::tempPath() + '/';
QString fileName = tempDir + testName + ".png";
imageWithBackground.save( fileName, "PNG" );
QgsRenderChecker checker;
QgsMultiRenderChecker checker;
checker.setControlPathPrefix( QStringLiteral( "labelingengine" ) );
checker.setControlName( "expected_" + testName );
checker.setRenderedImage( fileName );
checker.setColorTolerance( 2 );
bool resultFlag = checker.compareImages( testName, mismatchCount );
bool resultFlag = checker.runTest( testName, mismatchCount );
mReport += checker.report();
return resultFlag;
}
Expand Down Expand Up @@ -2173,7 +2173,7 @@ void TestQgsLabelingEngine::curvedOverrun()
QImage img = job.renderedImage();
QVERIFY( imageCheck( QStringLiteral( "label_curved_no_overrun" ), img, 20 ) );

settings.overrunDistance = 10;
settings.overrunDistance = 11;
vl2->setLabeling( new QgsVectorLayerSimpleLabeling( settings ) ); // TODO: this should not be necessary!
vl2->setLabelsEnabled( true );
QgsMapRendererSequentialJob job2( mapSettings );
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgsmaprendererjob.cpp
Expand Up @@ -45,7 +45,7 @@
#include "qgssinglesymbolrenderer.h"

//qgs unit test utility class
#include "qgsrenderchecker.h"
#include "qgsmultirenderchecker.h"

/**
* \ingroup UnitTests
Expand Down
4 changes: 2 additions & 2 deletions tests/src/core/testqgsmaprotation.cpp
Expand Up @@ -32,7 +32,7 @@
#include "qgsvectorlayerlabeling.h"

//qgis unit test includes
#include <qgsrenderchecker.h>
#include "qgsmultirenderchecker.h"

/**
* \ingroup UnitTests
Expand Down Expand Up @@ -222,7 +222,7 @@ bool TestQgsMapRotation::render( const QString &testType )
{
mReport += "<h2>" + testType + "</h2>\n";
mMapSettings->setOutputDpi( 96 );
QgsRenderChecker checker;
QgsMultiRenderChecker checker;
checker.setControlPathPrefix( QStringLiteral( "maprotation" ) );
checker.setControlName( "expected_" + testType );
checker.setMapSettings( *mMapSettings );
Expand Down
2 changes: 1 addition & 1 deletion tests/src/python/test_qgsserver_wms_getmap.py
Expand Up @@ -553,7 +553,7 @@ def test_wms_getmap_transparent(self):
self._img_diff_error(r, h, "WMS_GetMap_Transparent")

def test_wms_getmap_labeling_settings(self):
# Test the `DrawRectOnly` option with 1 candidate (`CandidatesPolygon`).
# Test the `DrawRectOnly` option
# May fail if the labeling position engine is tweaked.

d = unitTestDataPath('qgis_server_accesscontrol') + '/'
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 322eb31

Please sign in to comment.