summaryrefslogtreecommitdiffstats
path: root/tests/auto/qpainterpath/tst_qpainterpath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qpainterpath/tst_qpainterpath.cpp')
-rw-r--r--tests/auto/qpainterpath/tst_qpainterpath.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qpainterpath/tst_qpainterpath.cpp b/tests/auto/qpainterpath/tst_qpainterpath.cpp
index d0cddda..19b3156 100644
--- a/tests/auto/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp
@@ -60,6 +60,8 @@ public:
private slots:
void getSetCheck();
+ void swap();
+
void contains_QPointF_data();
void contains_QPointF();
@@ -139,6 +141,17 @@ void tst_QPainterPath::getSetCheck()
QCOMPARE(qreal(1.1), obj1.curveThreshold());
}
+void tst_QPainterPath::swap()
+{
+ QPainterPath p1;
+ p1.addRect( 0, 0,10,10);
+ QPainterPath p2;
+ p2.addRect(10,10,10,10);
+ p1.swap(p2);
+ QCOMPARE(p1.boundingRect().toRect(), QRect(10,10,10,10));
+ QCOMPARE(p2.boundingRect().toRect(), QRect( 0, 0,10,10));
+}
+
Q_DECLARE_METATYPE(QPainterPath)
Q_DECLARE_METATYPE(QPointF)
Q_DECLARE_METATYPE(QRectF)