summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmapfilter
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-11-10 12:13:24 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-11-10 12:13:24 (GMT)
commite2e8104c03608ef753f84740bdf6ac1bff18be84 (patch)
treec996be84098bae040ef7efaf612e85615c643187 /tests/auto/qpixmapfilter
parent1340c2ff7d395b0da0749506eee70510ef1e0a15 (diff)
downloadQt-e2e8104c03608ef753f84740bdf6ac1bff18be84.zip
Qt-e2e8104c03608ef753f84740bdf6ac1bff18be84.tar.gz
Qt-e2e8104c03608ef753f84740bdf6ac1bff18be84.tar.bz2
Fixed tst_qpixmapfilter testcase
Reviewed-by: Samuel
Diffstat (limited to 'tests/auto/qpixmapfilter')
-rw-r--r--tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
index b9c6b01..751c7dc 100644
--- a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
+++ b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
@@ -390,20 +390,20 @@ void tst_QPixmapFilter::dropShadowBoundingRectFor()
const QRectF rect3(2.2, 6.3, 11.4, 47.5);
filter.setOffset(QPointF(0,0));
- QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-2, -2, 2, 2));
- QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-2, -2, 2, 2));
- QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-2, -2, 2, 2));
+ QCOMPARE(filter.boundingRectFor(rect1), rect1);
+ QCOMPARE(filter.boundingRectFor(rect2), rect2);
+ QCOMPARE(filter.boundingRectFor(rect3), rect3);
filter.setOffset(QPointF(1,1));
QCOMPARE(filter.offset(), QPointF(1, 1));
- QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-2, -2, 2, 2));
- QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-2, -2, 2, 2));
- QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-2, -2, 2, 2));
+ QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(0, 0, 1, 1));
+ QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(0, 0, 1, 1));
+ QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(0, 0, 1, 1));
filter.setOffset(QPointF(-1,-1));
- QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-2, -2, 2, 2));
- QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-2, -2, 2, 2));
- QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-2, -2, 2, 2));
+ QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-1, -1, 0, 0));
+ QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-1, -1, 0, 0));
+ QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-1, -1, 0, 0));
filter.setBlurRadius(2);
filter.setOffset(QPointF(0,0));
@@ -418,9 +418,9 @@ void tst_QPixmapFilter::dropShadowBoundingRectFor()
QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta + 1, -delta + 1, delta + 1, delta + 1));
filter.setOffset(QPointF(-10,-10));
- QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-delta - 10, -delta - 10, 2, 2));
- QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-delta - 10, -delta - 10, 2, 2));
- QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta - 10, -delta - 10, 2, 2));
+ QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-delta - 10, -delta - 10, 0, 0));
+ QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-delta - 10, -delta - 10, 0, 0));
+ QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta - 10, -delta - 10, 0, 0));
}