Tolerance for wrong pixels, better cleanup

This commit is contained in:
Marco Hugentobler 2012-07-06 11:07:31 +02:00
parent 67ba1d5344
commit 8256d056a0
2 changed files with 6 additions and 1 deletions

View File

@ -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;
}

View File

@ -72,6 +72,7 @@ void TestQgsComposerMap::cleanupTestCase()
{
delete mComposition;
delete mMapRenderer;
delete mRasterLayer;
}
void TestQgsComposerMap::init()