diff options
Diffstat (limited to 'tests/auto/qregion/tst_qregion.cpp')
-rw-r--r-- | tests/auto/qregion/tst_qregion.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qregion/tst_qregion.cpp b/tests/auto/qregion/tst_qregion.cpp index 1716c94..f335051 100644 --- a/tests/auto/qregion/tst_qregion.cpp +++ b/tests/auto/qregion/tst_qregion.cpp @@ -64,6 +64,7 @@ public: private slots: void boundingRect(); void rects(); + void swap(); void setRects(); void ellipseRegion(); void polygonRegion(); @@ -168,6 +169,15 @@ void tst_QRegion::rects() } } +void tst_QRegion::swap() +{ + QRegion r1(QRect( 0, 0,10,10)); + QRegion r2(QRect(10,10,10,10)); + r1.swap(r2); + QCOMPARE(r1.rects().front(), QRect(10,10,10,10)); + QCOMPARE(r2.rects().front(), QRect( 0, 0,10,10)); +} + void tst_QRegion::setRects() { { |