summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpainterpath
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-01-25 10:02:16 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-01-25 14:52:56 (GMT)
commit7fd7454805ea091688339111e544cb70f7a24739 (patch)
tree41f2aef2a62313006df6c4e4b0cd19be5bd6b2b7 /tests/auto/qpainterpath
parent8729352726bbdca80e2813eee815e6a1a3ad06ff (diff)
downloadQt-7fd7454805ea091688339111e544cb70f7a24739.zip
Qt-7fd7454805ea091688339111e544cb70f7a24739.tar.gz
Qt-7fd7454805ea091688339111e544cb70f7a24739.tar.bz2
Fixed QPainterPath::pointAtPercent(t) for one-element paths.
Return the MoveTo element instead of QPointF(0, 0). Task-number: QTBUG-16788 Reviewed-by: Eskil Abrahamsen Blomfeldt
Diffstat (limited to 'tests/auto/qpainterpath')
-rw-r--r--tests/auto/qpainterpath/tst_qpainterpath.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qpainterpath/tst_qpainterpath.cpp b/tests/auto/qpainterpath/tst_qpainterpath.cpp
index 19b3156..ad5a968 100644
--- a/tests/auto/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp
@@ -1041,6 +1041,11 @@ void tst_QPainterPath::pointAtPercent_data()
QRectF rect(241, 273, 185, 228);
path.addEllipse(rect);
QTest::newRow("Case 17") << path << qreal(1.0) << QPointF(rect.right(), qreal(0.5) * (rect.top() + rect.bottom()));
+
+ path = QPainterPath();
+ path.moveTo(100, 100);
+ QTest::newRow("Case 18") << path << qreal(0.0) << QPointF(100, 100);
+ QTest::newRow("Case 19") << path << qreal(1.0) << QPointF(100, 100);
}
void tst_QPainterPath::pointAtPercent()