summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global/qcompare
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-11-29 20:40:52 +0100
committerIvan Solovev <ivan.solovev@qt.io>2023-12-07 23:36:15 +0100
commitccd0dc7f6d820b85cff94b890ceb4c6ffd9ae9d1 (patch)
tree247a7877d679784b1aed75da683d35a25ae802d1 /tests/auto/corelib/global/qcompare
parent07ed8acdf98cd6c058fb9f5d62953e863c1f7886 (diff)
QPartialOrdering: add lower-case flags for std/Qt:: compatibility
The misspelt flags (Less, etc) make it hard to use QPartialOrdering interchangably with Qt or std ordering types, e.g. in generic code. [ChangeLog][QtCore][QPartialOrdering] Added a set of lower-case flags (::less, ::greater, etc) to improve source-compatibility with {Qt,std}::partial_ordering. Change-Id: I160600c01c4a2ab72c7b217a306d08045e363578 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'tests/auto/corelib/global/qcompare')
-rw-r--r--tests/auto/corelib/global/qcompare/tst_qcompare.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qcompare/tst_qcompare.cpp b/tests/auto/corelib/global/qcompare/tst_qcompare.cpp
index e02eb61fde..8dc3cf5a37 100644
--- a/tests/auto/corelib/global/qcompare/tst_qcompare.cpp
+++ b/tests/auto/corelib/global/qcompare/tst_qcompare.cpp
@@ -25,6 +25,11 @@ private slots:
void tst_QCompare::legacyPartialOrdering()
{
+ static_assert(QPartialOrdering::Unordered == QPartialOrdering::unordered);
+ static_assert(QPartialOrdering::Less == QPartialOrdering::less);
+ static_assert(QPartialOrdering::Equivalent == QPartialOrdering::equivalent);
+ static_assert(QPartialOrdering::Greater == QPartialOrdering::greater);
+
static_assert(QPartialOrdering::Unordered == QPartialOrdering::Unordered);
static_assert(QPartialOrdering::Unordered != QPartialOrdering::Less);
static_assert(QPartialOrdering::Unordered != QPartialOrdering::Equivalent);