diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2018-08-22 20:30:57 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-08-28 13:11:55 +0000 |
commit | 1bf0344b9f41516ef28cd6c047aab801e24ac8df (patch) | |
tree | 0329b758f6b4bd331effd5756811cd510e62f26f /tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | |
parent | 12a7513a5d19d08d61653e7c802d867525eefc50 (diff) |
Update CLDR to v31.0.1, test Costa Rican currency's fractional part
CLDR up to somewhere between v29 (used by 5.9) and v31.0.1 (used by
5.10 and later) claimed Costa Ricans don't include fractions in their
currency; now it claims they expec two digits. Apparently one of them
does expect those two digits, so this adds a regression test (the
cherry-pick) and updates CLDR to 31.0.1 (to make the test pass), along
with needed fixes (as in 82deb0ad160) to some other tests.
Task-number: QTBUG-70093
Change-Id: I138772cc6013fa74de4f7c54b836cac83421eab2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit dc7e775c9c6ecc66f76af8139b8dfc3ee101c7ff)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/qlocale/tst_qlocale.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 10d78b1f2f..0549951070 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -2203,9 +2203,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")); @@ -2227,9 +2227,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() @@ -2328,6 +2328,10 @@ void tst_QLocale::currency() QCOMPARE(de_DE.toCurrencyString(double(-1234.56)), QString::fromUtf8("-1.234,56\xc2\xa0\xe2\x82\xac")); QCOMPARE(de_DE.toCurrencyString(double(-1234.56), QLatin1String("BAZ")), QString::fromUtf8("-1.234,56\xc2\xa0" "BAZ")); + const QLocale es_CR(QLocale::Spanish, QLocale::CostaRica); + QCOMPARE(es_CR.toCurrencyString(double(1565.25)), + QString::fromUtf8("\xE2\x82\xA1" "1\xC2\xA0" "565,25")); + const QLocale system = QLocale::system(); QVERIFY(system.toCurrencyString(1, QLatin1String("FOO")).contains(QLatin1String("FOO"))); } |