diff options
Diffstat (limited to 'tests/auto/qpen')
-rw-r--r-- | tests/auto/qpen/tst_qpen.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qpen/tst_qpen.cpp b/tests/auto/qpen/tst_qpen.cpp index 2e13f5b..3fc405c 100644 --- a/tests/auto/qpen/tst_qpen.cpp +++ b/tests/auto/qpen/tst_qpen.cpp @@ -59,6 +59,7 @@ public: private slots: void getSetCheck(); + void swap(); void operator_eq_eq(); void operator_eq_eq_data(); @@ -95,6 +96,14 @@ void tst_QPen::getSetCheck() } } +void tst_QPen::swap() +{ + QPen p1(Qt::black), p2(Qt::white); + p1.swap(p2); + QCOMPARE(p1.color(), QColor(Qt::white)); + QCOMPARE(p2.color(), QColor(Qt::black)); +} + Q_DECLARE_METATYPE(QPen) Q_DECLARE_METATYPE(QBrush) |