summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qpoint
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-08-03 09:27:49 +0300
committerMarc Mutz <marc.mutz@kdab.com>2019-08-07 23:09:06 +0300
commit1563c38a4b46ad427907b544508e888efbac9772 (patch)
treeecacc6e204900f11a9973633d924dd70cbe7efff /tests/auto/corelib/tools/qpoint
parent247ab241c783f776489d8bc348a84cb533079241 (diff)
QPoint/F: add transposed()
For symmetry with QSize and QRect and because there were some users in Qt. Port those users. [ChangeLog][QtCore][QPoint/QPointF] Added transposed(). Change-Id: If4f23dbcf7d67983a6b1885e0d1d538115b49e2b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/qpoint')
-rw-r--r--tests/auto/corelib/tools/qpoint/tst_qpoint.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
index 8e184f3ef3..f25492d2db 100644
--- a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
+++ b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp
@@ -42,6 +42,8 @@ private slots:
void getSet_data();
void getSet();
+ void transposed();
+
void rx();
void ry();
@@ -126,6 +128,11 @@ void tst_QPoint::getSet()
QCOMPARE(point.y(), i);
}
+void tst_QPoint::transposed()
+{
+ QCOMPARE(QPoint(1, 2).transposed(), QPoint(2, 1));
+}
+
void tst_QPoint::rx()
{
const QPoint originalPoint(-1, 0);