Skip to content

Commit

Permalink
Tolerance for wrong pixels, better cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jul 6, 2012
1 parent 67ba1d5 commit 8256d05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/src/core/qgscompositionchecker.cpp
Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions tests/src/core/testqgscomposermap.cpp
Expand Up @@ -72,6 +72,7 @@ void TestQgsComposerMap::cleanupTestCase()
{
delete mComposition;
delete mMapRenderer;
delete mRasterLayer;
}

void TestQgsComposerMap::init()
Expand Down

0 comments on commit 8256d05

Please sign in to comment.