summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2019-01-10 16:29:12 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2019-01-14 09:00:08 +0000
commitb544e2fe22333f0a5fbd24a1ee106c5501a6b886 (patch)
tree08ceef1ba7efb5bfe8f8fc0a3dfb28ba95258c3c /tests
parentc6cfb10b4eb8c227983fe7b4649cb0b691962743 (diff)
Fix QGeoRectangle::operator|=
This patch fixes the case when one QGeoRectangle contains the second, and wraps around. Change-Id: I7110c1864082c502845754fab2dc4e783455a446 Fixes: QTBUG-72935 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgeorectangle/tst_qgeorectangle.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qgeorectangle/tst_qgeorectangle.cpp b/tests/auto/qgeorectangle/tst_qgeorectangle.cpp
index 01f0104b..219e8dfd 100644
--- a/tests/auto/qgeorectangle/tst_qgeorectangle.cpp
+++ b/tests/auto/qgeorectangle/tst_qgeorectangle.cpp
@@ -2080,6 +2080,14 @@ void tst_QGeoRectangle::unite_data()
<< QGeoRectangle(QGeoCoordinate(30.0, -180.0),
QGeoCoordinate(-30.0, 180.0));
+ QTest::newRow("wrapping and one containing other")
+ << QGeoRectangle(QGeoCoordinate(30.0, 40.0),
+ QGeoCoordinate(-30.0, -40.0))
+ << QGeoRectangle(QGeoCoordinate(30.0, 160.0),
+ QGeoCoordinate(-30.0, 170.0))
+ << QGeoRectangle(QGeoCoordinate(30.0, 40.0),
+ QGeoCoordinate(-30.0, -40.0));
+
QTest::newRow("small gap over zero line")
<< QGeoRectangle(QGeoCoordinate(30.0, -20.0),
QGeoCoordinate(-30.0, -10.0))