summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTatiana Borisova <tatiana.borisova@qt.io>2022-01-12 15:34:34 +0200
committerTatiana Borisova <tatiana.borisova@qt.io>2022-01-12 21:49:02 +0000
commit2cb5e4bd4308f6cc7cee5db0d7f04341403bd917 (patch)
tree7ede3b99ef9507f09218c00c72e7d0af8572716d /tests
parent8623e8ed08b57ec4fe17fffbca9c5f53a551670e (diff)
Fix tst_qcollator run time issue on INTEGRITY device
By GHS the only C locale is supported. Task-number: QTBUG-99123 Pick-to: 6.2 6.3 Change-Id: I3d89f1b2d9eb7f77b75e13a5ca65cebc24538890 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/text/qcollator/tst_qcollator.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/corelib/text/qcollator/tst_qcollator.cpp b/tests/auto/corelib/text/qcollator/tst_qcollator.cpp
index 7c9ed76f77..5e2c7f1b53 100644
--- a/tests/auto/corelib/text/qcollator/tst_qcollator.cpp
+++ b/tests/auto/corelib/text/qcollator/tst_qcollator.cpp
@@ -76,8 +76,8 @@ void tst_QCollator::basics()
QCOMPARE(c3.locale(), de_AT);
// posix implementation supports only C and default locale,
- // so update it for Android build
-#ifdef Q_OS_ANDROID
+ // so update it for Android and INTEGRITY builds
+#if defined(Q_OS_ANDROID) || defined(Q_OS_INTEGRITY)
c3.setLocale(QLocale());
#endif
QCollatorSortKey key1 = c3.sortKey("test");
@@ -111,8 +111,8 @@ void tst_QCollator::moveSemantics()
// test QCollatorSortKey move assignment
// posix implementation supports only C and default locale,
- // so update it for Android build
-#ifdef Q_OS_ANDROID
+ // so update it for Android and INTEGRITY builds
+#if defined(Q_OS_ANDROID) || defined(Q_OS_INTEGRITY)
c1.setLocale(QLocale());
#endif
QCollatorSortKey key1 = c1.sortKey("1");
@@ -289,7 +289,7 @@ void tst_QCollator::compare()
return compared < 0 ? -1 : compared > 0 ? 1 : 0;
};
-#ifdef Q_OS_ANDROID
+#if defined(Q_OS_ANDROID) || defined(Q_OS_INTEGRITY)
if (collator.locale() != QLocale::c() && collator.locale() != QLocale::system().collation())
QSKIP("POSIX implementation of collation only supports C and system collation locales");
#endif