diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-08-03 09:27:49 +0300 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-08-07 23:09:06 +0300 |
commit | 1563c38a4b46ad427907b544508e888efbac9772 (patch) | |
tree | ecacc6e204900f11a9973633d924dd70cbe7efff /tests/auto/corelib/tools/qpointf | |
parent | 247ab241c783f776489d8bc348a84cb533079241 (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/qpointf')
-rw-r--r-- | tests/auto/corelib/tools/qpointf/tst_qpointf.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp b/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp index d4ccdf7ba6..e78a8e3082 100644 --- a/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp +++ b/tests/auto/corelib/tools/qpointf/tst_qpointf.cpp @@ -46,6 +46,8 @@ private slots: void getSet_data(); void getSet(); + void transposed(); + void rx(); void ry(); @@ -154,6 +156,11 @@ void tst_QPointF::getSet() QCOMPARE(point.y(), r); } +void tst_QPointF::transposed() +{ + QCOMPARE(QPointF(1, 2).transposed(), QPointF(2, 1)); +} + void tst_QPointF::rx() { const QPointF originalPoint(-1, 0); |