[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [gwenview/KDE/4.14] tests/auto: Get rid of the inline fuzzyImageCompare
From: Aurélien Gâteau <agateau () kde ! org>
Date: 2014-07-18 8:27:33
Message-ID: E1X83Vt-0002wm-2m () scm ! kde ! org
[Download RAW message or body]
Git commit a36e4357e679c18c93a020dcd6af20625332f04c by Aurélien Gâteau.
Committed on 18/07/2014 at 08:25.
Pushed by gateau into branch 'KDE/4.14'.
Get rid of the inline fuzzyImageCompare
M +0 -6 tests/auto/testutils.h
M +2 -2 tests/auto/thumbnailprovidertest.cpp
http://commits.kde.org/gwenview/a36e4357e679c18c93a020dcd6af20625332f04c
diff --git a/tests/auto/testutils.h b/tests/auto/testutils.h
index 7b4cf64..a549560 100644
--- a/tests/auto/testutils.h
+++ b/tests/auto/testutils.h
@@ -127,10 +127,4 @@ private:
} // namespace
-inline bool fuzzyImageCompare(const QImage& img1, const QImage& img2)
-{
- return TestUtils::fuzzyImageCompare(img1, img2);
-}
-
-
#endif /* TESTUTILS_H */
diff --git a/tests/auto/thumbnailprovidertest.cpp b/tests/auto/thumbnailprovidertest.cpp
index 746f9ba..a37517c 100644
--- a/tests/auto/thumbnailprovidertest.cpp
+++ b/tests/auto/thumbnailprovidertest.cpp
@@ -192,7 +192,7 @@ void ThumbnailProviderTest::testUseEmbeddedOrNot()
QPixmap thumbnailPix;
SandBox sandBox;
sandBox.initDir();
- // This image is red and 256x128 but contains a white 128x64 thumbnail
+ // This image is red (0xfe0000) and 256x128 but contains a white 128x64 thumbnail
sandBox.copyTestImage("embedded-thumbnail.jpg", 256, 128);
KFileItemList list;
@@ -210,7 +210,7 @@ void ThumbnailProviderTest::testUseEmbeddedOrNot()
QCOMPARE(spy.count(), 1);
expectedThumbnail = createColoredImage(128, 64, Qt::white);
thumbnailPix = qvariant_cast<QPixmap>(spy.at(0).at(1));
- QVERIFY(fuzzyImageCompare(expectedThumbnail, thumbnailPix.toImage()));
+ QVERIFY(TestUtils::imageCompare(expectedThumbnail, thumbnailPix.toImage()));
}
// Loading a large thumbnail should bring the red one
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic