diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 884cff553c..0da88428ec 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -370,7 +370,7 @@ void tst_QLocale::defaulted_ctor() QVERIFY2(l.language() == QLocale::exp_lang \ && l.country() == QLocale::exp_country, \ QString("requested: \"" + QString(req_lc) + "\", got: " \ - + QLocale::languageToString(l.language()) \ + + QLocale::languageToString(l.language()) \ + QLatin1Char('/') + QLocale::countryToString(l.country())).toLatin1().constData()); \ QCOMPARE(l, QLocale(QLocale::exp_lang, QLocale::exp_country)); \ QCOMPARE(qHash(l), qHash(QLocale(QLocale::exp_lang, QLocale::exp_country))); \ @@ -598,7 +598,7 @@ void tst_QLocale::legacyNames() QVERIFY2(l.language() == QLocale::exp_lang \ && l.country() == QLocale::exp_country, \ QString("requested: \"" + QString(req_lc) + "\", got: " \ - + QLocale::languageToString(l.language()) \ + + QLocale::languageToString(l.language()) \ + QLatin1Char('/') + QLocale::countryToString(l.country())).toLatin1().constData()); \ } @@ -1298,7 +1298,6 @@ void tst_QLocale::formatDate() QCOMPARE(l.toString(date, QStringView(format)), result); } - void tst_QLocale::formatTime_data() { QTest::addColumn("time"); @@ -1635,10 +1634,10 @@ void tst_QLocale::toDateTime_data() << "d'd'dd/M/yyh" << "1d01/12/7415"; QTest::newRow("RFC-1123") << "C" << QDateTime(QDate(2007, 11, 1), QTime(18, 8, 30)) - << "ddd, dd MMM yyyy hh:mm:ss 'GMT'" << "Thu, 01 Nov 2007 18:08:30 GMT"; + << "ddd, dd MMM yyyy hh:mm:ss 'GMT'" << "Thu, 01 Nov 2007 18:08:30 GMT"; QTest::newRow("longFormat") << "en_US" << QDateTime(QDate(2009, 1, 5), QTime(11, 48, 32)) - << "dddd, MMMM d, yyyy h:mm:ss AP " << "Monday, January 5, 2009 11:48:32 AM "; + << "dddd, MMMM d, yyyy h:mm:ss AP " << "Monday, January 5, 2009 11:48:32 AM "; } void tst_QLocale::toDateTime() @@ -2053,13 +2052,13 @@ void tst_QLocale::dayName_data() QTest::addColumn("day"); QTest::addColumn("format"); - QTest::newRow("no_NO") << QString("no_NO") << QString("tirsdag") << 2 << QLocale::LongFormat; - QTest::newRow("nb_NO") << QString("nb_NO") << QString("tirsdag") << 2 << QLocale::LongFormat; - QTest::newRow("nn_NO") << QString("nn_NO") << QString("tysdag") << 2 << QLocale::LongFormat; + QTest::newRow("no_NO") << QString("no_NO") << QString("tirsdag") << 2 << QLocale::LongFormat; + QTest::newRow("nb_NO") << QString("nb_NO") << QString("tirsdag") << 2 << QLocale::LongFormat; + QTest::newRow("nn_NO") << QString("nn_NO") << QString("tysdag") << 2 << QLocale::LongFormat; - QTest::newRow("C long") << QString("C") << QString("Sunday") << 7 << QLocale::LongFormat; - QTest::newRow("C short") << QString("C") << QString("Sun") << 7 << QLocale::ShortFormat; - QTest::newRow("C narrow") << QString("C") << QString("7") << 7 << QLocale::NarrowFormat; + QTest::newRow("C long") << QString("C") << QString("Sunday") << 7 << QLocale::LongFormat; + QTest::newRow("C short") << QString("C") << QString("Sun") << 7 << QLocale::ShortFormat; + QTest::newRow("C narrow") << QString("C") << QString("7") << 7 << QLocale::NarrowFormat; QTest::newRow("ru_RU long") << QString("ru_RU") << QString::fromUtf8("\320\262\320\276\321\201\320\272\321\200\320\265\321\201\320\265\320\275\321\214\320\265") << 7 << QLocale::LongFormat; QTest::newRow("ru_RU short") << QString("ru_RU") << QString::fromUtf8("\320\262\321\201") << 7 << QLocale::ShortFormat; @@ -2093,20 +2092,20 @@ void tst_QLocale::standaloneDayName_data() QTest::addColumn("day"); QTest::addColumn("format"); - QTest::newRow("no_NO") << QString("no_NO") << QString("tirsdag") << 2 << QLocale::LongFormat; - QTest::newRow("nb_NO") << QString("nb_NO") << QString("tirsdag") << 2 << QLocale::LongFormat; - QTest::newRow("nn_NO") << QString("nn_NO") << QString("tysdag") << 2 << QLocale::LongFormat; + QTest::newRow("no_NO") << QString("no_NO") << QString("tirsdag") << 2 << QLocale::LongFormat; + QTest::newRow("nb_NO") << QString("nb_NO") << QString("tirsdag") << 2 << QLocale::LongFormat; + QTest::newRow("nn_NO") << QString("nn_NO") << QString("tysdag") << 2 << QLocale::LongFormat; - QTest::newRow("C invalid: 0 long") << QString("C") << QString() << 0 << QLocale::LongFormat; - QTest::newRow("C invalid: 0 short") << QString("C") << QString() << 0 << QLocale::ShortFormat; - QTest::newRow("C invalid: 0 narrow") << QString("C") << QString() << 0 << QLocale::NarrowFormat; - QTest::newRow("C invalid: 8 long") << QString("C") << QString() << 8 << QLocale::LongFormat; - QTest::newRow("C invalid: 8 short") << QString("C") << QString() << 8 << QLocale::ShortFormat; - QTest::newRow("C invalid: 8 narrow") << QString("C") << QString() << 8 << QLocale::NarrowFormat; + QTest::newRow("C invalid: 0 long") << QString("C") << QString() << 0 << QLocale::LongFormat; + QTest::newRow("C invalid: 0 short") << QString("C") << QString() << 0 << QLocale::ShortFormat; + QTest::newRow("C invalid: 0 narrow") << QString("C") << QString() << 0 << QLocale::NarrowFormat; + QTest::newRow("C invalid: 8 long") << QString("C") << QString() << 8 << QLocale::LongFormat; + QTest::newRow("C invalid: 8 short") << QString("C") << QString() << 8 << QLocale::ShortFormat; + QTest::newRow("C invalid: 8 narrow") << QString("C") << QString() << 8 << QLocale::NarrowFormat; - QTest::newRow("C long") << QString("C") << QString("Sunday") << 7 << QLocale::LongFormat; - QTest::newRow("C short") << QString("C") << QString("Sun") << 7 << QLocale::ShortFormat; - QTest::newRow("C narrow") << QString("C") << QString("S") << 7 << QLocale::NarrowFormat; + QTest::newRow("C long") << QString("C") << QString("Sunday") << 7 << QLocale::LongFormat; + QTest::newRow("C short") << QString("C") << QString("Sun") << 7 << QLocale::ShortFormat; + QTest::newRow("C narrow") << QString("C") << QString("S") << 7 << QLocale::NarrowFormat; QTest::newRow("ru_RU long") << QString("ru_RU") << QString::fromUtf8("\320\262\320\276\321\201\320\272\321\200\320\265\321\201\320\265\320\275\321\214\320\265") << 7 << QLocale::LongFormat; QTest::newRow("ru_RU short") << QString("ru_RU") << QString::fromUtf8("\320\262\321\201") << 7 << QLocale::ShortFormat;