summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/tools/qmargins/tst_qmargins.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
index d22e771b79..ec83740196 100644
--- a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
+++ b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp
@@ -93,6 +93,12 @@ void tst_QMargins::operators()
a -= m2;
QCOMPARE(a, subtracted);
+ QMargins h = m1;
+ h += 2;
+ QCOMPARE(h, QMargins(14, 16, 18, 20));
+ h -= 2;
+ QCOMPARE(h, m1);
+
const QMargins doubled = m1 * 2;
QCOMPARE(doubled, QMargins(24, 28, 32, 36));
QCOMPARE(2 * m1, doubled);