diff options
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/tools/qrect/tst_qrect.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qrect/tst_qrect.cpp b/tests/auto/corelib/tools/qrect/tst_qrect.cpp index 1b11673bd1..c5e3aa58e0 100644 --- a/tests/auto/corelib/tools/qrect/tst_qrect.cpp +++ b/tests/auto/corelib/tools/qrect/tst_qrect.cpp @@ -3496,6 +3496,10 @@ void tst_QRect::margins() QCOMPARE(added, margins + rectangle); QCOMPARE(added, rectangle.marginsAdded(margins)); + const QRect subtracted = rectangle - margins; + QCOMPARE(subtracted, QRect(QPoint(12, 13), QSize(44, 42))); + QCOMPARE(subtracted, rectangle.marginsRemoved(margins)); + QRect a = rectangle; a += margins; QCOMPARE(added, a); |