Skip to content

Commit

Permalink
Tests: fix Qt5 paths
Browse files Browse the repository at this point in the history
  • Loading branch information
martyone authored and pvuorela committed Oct 7, 2014
1 parent b203bf0 commit 36d60a3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/ft_locales/ft_locales.cpp
Expand Up @@ -3930,7 +3930,11 @@ void Ft_Locales::testMLocaleIndexBucket()
// we need to instantiate a MLocale before dataPaths returns
// a valid result.
MLocale locale(localeName);
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QCOMPARE(MLocale::dataPaths(), (QStringList() << "/usr/share/mlocale/icu"));
#else
QCOMPARE(MLocale::dataPaths(), (QStringList() << "/usr/share/mlocale5/icu"));
#endif

MLocale localeEn("en_US");
locale.setCategoryLocale(MLocale::MLcCollate, lcCollate);
Expand Down Expand Up @@ -4093,7 +4097,11 @@ void Ft_Locales::testDifferentStrengthComparison()
QFETCH(QString, string2);
QFETCH(QList<MLocale::Comparison>, comparisonExpectedResults);

#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QCOMPARE(MLocale::dataPaths(), (QStringList() << "/usr/share/mlocale/icu"));
#else
QCOMPARE(MLocale::dataPaths(), (QStringList() << "/usr/share/mlocale5/icu"));
#endif
MLocale locale(localeName);
locale.setCategoryLocale(MLocale::MLcCollate, lcCollate);
MCollator collator = locale.collator();
Expand Down Expand Up @@ -4503,7 +4511,11 @@ void Ft_Locales::checkAvailableLocales()
QString ft_localesTestOutput = "";
foreach(QString supportedLocaleName, supportedLocaleNames) {
MLocale locale(supportedLocaleName);
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QCOMPARE(MLocale::dataPaths(), (QStringList() << "/usr/share/mlocale/icu"));
#else
QCOMPARE(MLocale::dataPaths(), (QStringList() << "/usr/share/mlocale5/icu"));
#endif
locale.setTimeFormat24h(MLocale::LocaleDefaultTimeFormat24h);
QCOMPARE(locale.timeFormat24h(), MLocale::LocaleDefaultTimeFormat24h);
qSort(sortingTestList.begin(), sortingTestList.end(), locale.collator());
Expand Down
4 changes: 4 additions & 0 deletions tests/ut_mcalendar/ut_mcalendar.cpp
Expand Up @@ -95,7 +95,11 @@ void Ut_MCalendar::cleanup()
void Ut_MCalendar::testDataPaths()
{
MLocale locale;
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
QCOMPARE(MLocale::dataPaths(), (QStringList() << "/usr/share/mlocale/icu"));
#else
QCOMPARE(MLocale::dataPaths(), (QStringList() << "/usr/share/mlocale5/icu"));
#endif
}

void Ut_MCalendar::testTimeZones()
Expand Down

0 comments on commit 36d60a3

Please sign in to comment.