Skip to content

Commit

Permalink
Renderer tests passing now
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Apr 8, 2012
1 parent 712cab9 commit bbf471e
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/src/core/qgsrenderchecker.cpp
Expand Up @@ -63,7 +63,7 @@ bool QgsRenderChecker::runTest( QString theTestName,
mpMapRenderer->setOutputSize( QSize(
myExpectedImage.width(),
myExpectedImage.height() ),
myExpectedImage.logicalDpiX() );
myExpectedImage.logicalDpiX());
QTime myTime;
myTime.start();
mpMapRenderer->render( &myPainter );
Expand All @@ -73,8 +73,9 @@ bool QgsRenderChecker::runTest( QString theTestName,
// Save the pixmap to disk so the user can make a
// visual assessment if needed
//
mRenderedImageFile = QDir::tempPath() + QDir::separator() + theTestName + "_result.png";
myImage.save( mRenderedImageFile );
mRenderedImageFile = QDir::tempPath() + QDir::separator() +
theTestName + "_result.png";
myImage.save( mRenderedImageFile, "PNG", 100 );
return compareImages( theTestName, theMismatchCount );

}
Expand Down Expand Up @@ -106,8 +107,11 @@ bool QgsRenderChecker::compareImages( QString theTestName,
//
QImage myExpectedImage( mExpectedImageFile );
QImage myResultImage( mRenderedImageFile );
QImage myDifferenceImage( myExpectedImage.width(), myExpectedImage.height(), QImage::Format_RGB32 );
QString myResultDiffImage = QDir::tempPath() + QDir::separator() + theTestName + "_result_diff.png";
QImage myDifferenceImage( myExpectedImage.width(),
myExpectedImage.height(),
QImage::Format_RGB32 );
QString myResultDiffImage = QDir::tempPath() + QDir::separator() +
theTestName + "_result_diff.png";
myDifferenceImage.fill( qRgb( 152, 219, 249 ) );

//
Expand Down
Binary file modified tests/testdata/expected_continuous.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testdata/expected_graduated.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testdata/expected_landsat_875.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testdata/expected_landsat_basic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testdata/expected_raster_pseudo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testdata/expected_single.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/testdata/expected_uniquevalue.png
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 bbf471e

Please sign in to comment.