Commit 7f637e3f authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix FilterStrokeTest

Add fuzziness
parent ea13e179
......@@ -124,12 +124,12 @@ KoCanvasResourceManager* utils::createResourceManager(KisImageWSP image,
return manager;
}
utils::StrokeTester::StrokeTester(const QString &name, const QSize &imageSize, const QString &presetFilename)
: m_name(name),
m_imageSize(imageSize),
m_presetFilename(presetFilename),
m_numIterations(1)
m_numIterations(1),
m_baseFuzziness(1)
{
}
......@@ -142,6 +142,11 @@ void utils::StrokeTester::setNumIterations(int value)
m_numIterations = value;
}
void utils::StrokeTester::setBaseFuzziness(int value)
{
m_baseFuzziness = value;
}
void utils::StrokeTester::test()
{
testOneStroke(false, false, false);
......@@ -190,7 +195,7 @@ void utils::StrokeTester::testOneStroke(bool cancelled,
refImage.load(referenceFile(testName));
QPoint temp;
if(!TestUtil::compareQImages(temp, refImage, resultImage, 1, 1)) {
if(!TestUtil::compareQImages(temp, refImage, resultImage, m_baseFuzziness, m_baseFuzziness)) {
refImage.save(dumpReferenceFile(testName));
resultImage.save(resultFile(testName));
......
......@@ -47,6 +47,7 @@ namespace utils {
void benchmark();
void setNumIterations(int value);
void setBaseFuzziness(int value);
protected:
KisStrokeId strokeId() {
......@@ -99,6 +100,7 @@ namespace utils {
QSize m_imageSize;
QString m_presetFilename;
int m_numIterations;
int m_baseFuzziness;
};
}
......
......@@ -35,6 +35,7 @@ public:
: StrokeTester(QString("filter_") + filterName, QSize(500, 500), ""),
m_filterName(filterName)
{
setBaseFuzziness(5);
}
protected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment