mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-19 00:02:48 -04:00
Tolerance for wrong pixels, better cleanup
This commit is contained in:
parent
67ba1d5344
commit
8256d056a0
@ -98,5 +98,9 @@ bool QgsCompositionChecker::compareImages( const QImage& img1, const QImage& img
|
||||
}
|
||||
}
|
||||
}
|
||||
return mismatchCount < 1;
|
||||
|
||||
int pixelCount = imageWidth * imageHeight;
|
||||
|
||||
//allow pixel deviation of 1 percent
|
||||
return (( double )mismatchCount / ( double )pixelCount ) < 0.01;
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ void TestQgsComposerMap::cleanupTestCase()
|
||||
{
|
||||
delete mComposition;
|
||||
delete mMapRenderer;
|
||||
delete mRasterLayer;
|
||||
}
|
||||
|
||||
void TestQgsComposerMap::init()
|
||||
|
Loading…
x
Reference in New Issue
Block a user