summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2021-10-25 12:47:07 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2021-11-12 18:06:44 +0100
commit3446313c7a5cd6005089866a7b20c9f28e132a0a (patch)
tree478c27abde94592fa5777440072bbb44413b69e7 /tests/auto/corelib
parent0b70d698c8ad314f5bbf4a13914293aefe7d200f (diff)
Teach QOperatingSystemVersion to handle new OS entries in patch releases
Adding new entries to QOperatingSystemVersion in patch releases was previously breaking our BC guarantees because the entries are exported, thus users cannot freely switch between different patch-releases without a recompile if they adopted the new entries. Move the data itself to a base class so that the entries can be constructed inline. Task-number: QTBUG-97808 Change-Id: Ic44f07488af8a04a3bedc10bebb740c4d68f43f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/global/qoperatingsystemversion/tst_qoperatingsystemversion.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qoperatingsystemversion/tst_qoperatingsystemversion.cpp b/tests/auto/corelib/global/qoperatingsystemversion/tst_qoperatingsystemversion.cpp
index b109666be5..d1f9279b57 100644
--- a/tests/auto/corelib/global/qoperatingsystemversion/tst_qoperatingsystemversion.cpp
+++ b/tests/auto/corelib/global/qoperatingsystemversion/tst_qoperatingsystemversion.cpp
@@ -40,6 +40,8 @@ private slots:
void comparison_data();
void comparison();
+
+ void mixedComparison();
};
void tst_QOperatingSystemVersion::construction_data()
@@ -177,5 +179,14 @@ void tst_QOperatingSystemVersion::comparison()
QCOMPARE(lhsSystemInfo >= rhsSystemInfo, moreEqualResult);
}
+void tst_QOperatingSystemVersion::mixedComparison()
+{
+ // ==
+ QVERIFY(QOperatingSystemVersion::Windows10
+ >= QOperatingSystemVersionBase(QOperatingSystemVersionBase::Windows, 10, 0));
+ QVERIFY(QOperatingSystemVersion::Windows10
+ <= QOperatingSystemVersionBase(QOperatingSystemVersionBase::Windows, 10, 0));
+}
+
QTEST_MAIN(tst_QOperatingSystemVersion)
#include "tst_qoperatingsystemversion.moc"