summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpixmapfilter
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-11-10 15:23:04 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-11-10 15:32:55 +1000
commit829265b98a6c7c3856f3504e29209bff38c95ce9 (patch)
treec1f3d84f3a5a8baee98dc35c23d129ffde0ea08b /tests/auto/qpixmapfilter
parent6125645db9ddb8bc614f79961138d5371b8717d6 (diff)
Match drop shadow bounding rectangle unit test to the new implementation
Reviewed-by: Sarah Smith
Diffstat (limited to 'tests/auto/qpixmapfilter')
-rw-r--r--tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
index a80c7878c9..3f5c3d3b73 100644
--- a/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
+++ b/tests/auto/qpixmapfilter/tst_qpixmapfilter.cpp
@@ -390,24 +390,24 @@ 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);
- QCOMPARE(filter.boundingRectFor(rect2), rect2);
- QCOMPARE(filter.boundingRectFor(rect3), rect3);
+ 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));
filter.setOffset(QPointF(1,1));
QCOMPARE(filter.offset(), QPointF(1, 1));
- 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));
+ 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));
filter.setOffset(QPointF(-1,-1));
- 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));
+ 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));
filter.setBlurRadius(2);
filter.setOffset(QPointF(0,0));
- int delta = 2 * 2;
+ int delta = 2 + 1;
QCOMPARE(filter.boundingRectFor(rect1), rect1.adjusted(-delta, -delta, delta, delta));
QCOMPARE(filter.boundingRectFor(rect2), rect2.adjusted(-delta, -delta, delta, delta));
QCOMPARE(filter.boundingRectFor(rect3), rect3.adjusted(-delta, -delta, delta, delta));
@@ -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, 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));
+ 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));
}