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)
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 10:24:58 (GMT)
commite483f2c65139d7004ba35768340adecf23319eb8 (patch)
tree4e3c1405c74d9628c76b7d868221caf8fc8c10c3 /tests/auto/qpainterpath
parent00dfa90f9f2fef1f29fd356c488da5e156f20227 (diff)
downloadQt-e483f2c65139d7004ba35768340adecf23319eb8.zip
Qt-e483f2c65139d7004ba35768340adecf23319eb8.tar.gz
Qt-e483f2c65139d7004ba35768340adecf23319eb8.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 47cd7c6..21ce9e1 100644
--- a/tests/auto/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp
@@ -1040,6 +1040,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()