summaryrefslogtreecommitdiffstats
path: root/tests/auto/qregion
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2010-11-02 15:20:38 +0100
committerOlivier Goffart <olivier.goffart@nokia.com>2010-11-03 11:50:48 +0100
commit86ea8521c6f145be24c40c799b6b4e8f6e854e2b (patch)
treebbceb07abeb3f8b974287ea648fd995b4ba8345c /tests/auto/qregion
parentd12681a4cf1227d0e92fc7cf12aa3977e6ffe3fe (diff)
Add member-swap to shared datatypes that don't have it.
For consistency. Merge-request: 871 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'tests/auto/qregion')
-rw-r--r--tests/auto/qregion/tst_qregion.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qregion/tst_qregion.cpp b/tests/auto/qregion/tst_qregion.cpp
index 1716c94ffa..f3350510cb 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()
{
{