Skip to content
Permalink
Browse files

Tolerance for wrong pixels, better cleanup

  • Loading branch information
mhugent committed Jul 6, 2012
1 parent 67ba1d5 commit 8256d056a0928905dd04a2a505e9325a4b69632f
Showing with 6 additions and 1 deletion.
  1. +5 −1 tests/src/core/qgscompositionchecker.cpp
  2. +1 −0 tests/src/core/testqgscomposermap.cpp
@@ -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()

0 comments on commit 8256d05

Please sign in to comment.
You can’t perform that action at this time.