diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-26 01:01:13 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-26 01:01:14 +0200 |
commit | 86e74d60d2ab66a142a3ed02aabcadaab53b94ed (patch) | |
tree | 11ebf7349863272acb4821ceeb99c394407c5121 /tests | |
parent | 9d504e1150e4bd49d34aba5cee938d1fd9f7e80c (diff) | |
parent | 48603baf949f12928476f11e17fd387b8903d971 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I208a36bf1c88c8291baaa5ca8fe8e838bc9d7aea
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/text/qcollator/qcollator.pro | 1 | ||||
-rw-r--r-- | tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 14 | ||||
-rw-r--r-- | tests/auto/corelib/text/qstring/qstring.pro | 3 | ||||
-rw-r--r-- | tests/auto/corelib/text/qstring/tst_qstring.cpp | 21 |
4 files changed, 19 insertions, 20 deletions
diff --git a/tests/auto/corelib/text/qcollator/qcollator.pro b/tests/auto/corelib/text/qcollator/qcollator.pro index 2f3995a75f..b7aa256ded 100644 --- a/tests/auto/corelib/text/qcollator/qcollator.pro +++ b/tests/auto/corelib/text/qcollator/qcollator.pro @@ -3,4 +3,3 @@ TARGET = tst_qcollator QT = core-private testlib SOURCES = tst_qcollator.cpp DEFINES += QT_NO_CAST_TO_ASCII -qtConfig(icu): DEFINES += QT_USE_ICU diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp index 676c66df3e..3aa3d97dbc 100644 --- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2019 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -2459,9 +2459,9 @@ void tst_QLocale::timeFormat() QCOMPARE(c.timeFormat(QLocale::NarrowFormat), c.timeFormat(QLocale::ShortFormat)); const QLocale no("no_NO"); - QCOMPARE(no.timeFormat(QLocale::NarrowFormat), QLatin1String("HH.mm")); - QCOMPARE(no.timeFormat(QLocale::ShortFormat), QLatin1String("HH.mm")); - QCOMPARE(no.timeFormat(QLocale::LongFormat), QLatin1String("HH.mm.ss t")); + QCOMPARE(no.timeFormat(QLocale::NarrowFormat), QLatin1String("HH:mm")); + QCOMPARE(no.timeFormat(QLocale::ShortFormat), QLatin1String("HH:mm")); + QCOMPARE(no.timeFormat(QLocale::LongFormat), QLatin1String("HH:mm:ss t")); const QLocale id("id_ID"); QCOMPARE(id.timeFormat(QLocale::ShortFormat), QLatin1String("HH.mm")); @@ -2483,9 +2483,9 @@ void tst_QLocale::dateTimeFormat() QCOMPARE(c.dateTimeFormat(QLocale::NarrowFormat), c.dateTimeFormat(QLocale::ShortFormat)); const QLocale no("no_NO"); - QCOMPARE(no.dateTimeFormat(QLocale::NarrowFormat), QLatin1String("dd.MM.yyyy HH.mm")); - QCOMPARE(no.dateTimeFormat(QLocale::ShortFormat), QLatin1String("dd.MM.yyyy HH.mm")); - QCOMPARE(no.dateTimeFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM yyyy HH.mm.ss t")); + QCOMPARE(no.dateTimeFormat(QLocale::NarrowFormat), QLatin1String("dd.MM.yyyy HH:mm")); + QCOMPARE(no.dateTimeFormat(QLocale::ShortFormat), QLatin1String("dd.MM.yyyy HH:mm")); + QCOMPARE(no.dateTimeFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM yyyy HH:mm:ss t")); } void tst_QLocale::monthName() diff --git a/tests/auto/corelib/text/qstring/qstring.pro b/tests/auto/corelib/text/qstring/qstring.pro index ec8a9b5df5..5fff5530b7 100644 --- a/tests/auto/corelib/text/qstring/qstring.pro +++ b/tests/auto/corelib/text/qstring/qstring.pro @@ -2,8 +2,7 @@ CONFIG += testcase TARGET = tst_qstring QT = core-private testlib SOURCES = tst_qstring.cpp -DEFINES += QT_NO_CAST_TO_ASCII -qtConfig(icu): DEFINES += QT_USE_ICU +# DEFINES += QT_NO_CAST_TO_ASCII # actively #undef-ed by tst_qstring.cpp qtConfig(c++11): CONFIG += c++11 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index c96210f53d..2108e99f20 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -37,6 +37,7 @@ # undef QT_ASCII_CAST_WARNINGS #endif +#include <private/qglobal_p.h> // for the icu feature test #include <QtTest/QtTest> #include <qregexp.h> #include <qregularexpression.h> @@ -577,7 +578,7 @@ private slots: void repeated_data() const; void compareRef(); void arg_locale(); -#ifdef QT_USE_ICU +#if QT_CONFIG(icu) void toUpperLower_icu(); #endif #if !defined(QT_NO_UNICODE_LITERAL) @@ -2235,7 +2236,7 @@ void tst_QString::toUpper() upper += QChar(QChar::highSurrogate(0x10428)); QCOMPARE(lower.toUpper(), upper); -#ifdef QT_USE_ICU +#if QT_CONFIG(icu) // test doesn't work with ICU support, since QChar is unaware of any locale QEXPECT_FAIL("", "test doesn't work with ICU support, since QChar is unaware of any locale", Continue); QVERIFY(false); @@ -2247,7 +2248,7 @@ void tst_QString::toUpper() if (upper.length() == 1) QVERIFY(upper == QString(1, QChar(i).toUpper())); } -#endif +#endif // icu } void tst_QString::toLower() @@ -2295,7 +2296,7 @@ void tst_QString::toLower() upper += QChar(QChar::highSurrogate(0x10400)); QCOMPARE( upper.toLower(), lower); -#ifdef QT_USE_ICU +#if QT_CONFIG(icu) // test doesn't work with ICU support, since QChar is unaware of any locale QEXPECT_FAIL("", "test doesn't work with ICU support, since QChar is unaware of any locale", Continue); QVERIFY(false); @@ -2307,7 +2308,7 @@ void tst_QString::toLower() if (lower.length() == 1) QVERIFY(str.toLower() == QString(1, QChar(i).toLower())); } -#endif +#endif // icu } void tst_QString::isUpper() @@ -5623,7 +5624,7 @@ void tst_QString::localeAwareCompare() QStringRef r2(&s2, 0, s2.length()); if (!locale.isEmpty()) { -#if defined (Q_OS_DARWIN) || defined(QT_USE_ICU) +#if defined (Q_OS_DARWIN) || QT_CONFIG(icu) QSKIP("Setting the locale is not supported on OS X or ICU (you can set the C locale, but that won't affect localeAwareCompare)"); #else const char *newLocale = setlocale(LC_ALL, locale.toLatin1()); @@ -5631,10 +5632,10 @@ void tst_QString::localeAwareCompare() setlocale(LC_ALL, ""); QSKIP("Please install the proper locale on this machine to test properly"); } -#endif +#endif // Darwin || icu } -#ifdef QT_USE_ICU +#if QT_CONFIG(icu) // ### for c1, ICU disagrees with libc on how to compare QEXPECT_FAIL("c1", "ICU disagrees with test", Abort); #endif @@ -6592,7 +6593,7 @@ void tst_QString::arg_locale() } -#ifdef QT_USE_ICU +#if QT_CONFIG(icu) // Qt has to be built with ICU support void tst_QString::toUpperLower_icu() { @@ -6626,7 +6627,7 @@ void tst_QString::toUpperLower_icu() QCOMPARE(l.toLower(sup), sup); QCOMPARE(l.toLower(QString::fromLatin1("i")), QString::fromLatin1("i")); } -#endif +#endif // icu #if !defined(QT_NO_UNICODE_LITERAL) // Only tested on c++0x compliant compiler or gcc |