summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r--tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
index ed08bcefbf..ac8530bd54 100644
--- a/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
+++ b/tests/auto/corelib/tools/qtimezone/tst_qtimezone.cpp
@@ -371,7 +371,7 @@ void tst_QTimeZone::windowsId()
{
/*
Current Windows zones for "Central Standard Time":
- Region Olsen Id(s)
+ Region IANA Id(s)
Default "America/Chicago"
Canada "America/Winnipeg America/Rainy_River America/Rankin_Inlet America/Resolute"
Mexico "America/Matamoros"
@@ -380,24 +380,24 @@ void tst_QTimeZone::windowsId()
"America/North_Dakota/New_Salem"
AnyCountry "CST6CDT"
*/
- QCOMPARE(QTimeZone::olsenIdToWindowsId("America/Chicago"),
+ QCOMPARE(QTimeZone::ianaIdToWindowsId("America/Chicago"),
QByteArray("Central Standard Time"));
- QCOMPARE(QTimeZone::olsenIdToWindowsId("America/Resolute"),
+ QCOMPARE(QTimeZone::ianaIdToWindowsId("America/Resolute"),
QByteArray("Central Standard Time"));
// Partials shouldn't match
- QCOMPARE(QTimeZone::olsenIdToWindowsId("America/Chi"), QByteArray());
- QCOMPARE(QTimeZone::olsenIdToWindowsId("InvalidZone"), QByteArray());
- QCOMPARE(QTimeZone::olsenIdToWindowsId(QByteArray()), QByteArray());
+ QCOMPARE(QTimeZone::ianaIdToWindowsId("America/Chi"), QByteArray());
+ QCOMPARE(QTimeZone::ianaIdToWindowsId("InvalidZone"), QByteArray());
+ QCOMPARE(QTimeZone::ianaIdToWindowsId(QByteArray()), QByteArray());
// Check default value
- QCOMPARE(QTimeZone::windowsIdToDefaultOlsenId("Central Standard Time"),
+ QCOMPARE(QTimeZone::windowsIdToDefaultIanaId("Central Standard Time"),
QByteArray("America/Chicago"));
- QCOMPARE(QTimeZone::windowsIdToDefaultOlsenId("Central Standard Time", QLocale::Canada),
+ QCOMPARE(QTimeZone::windowsIdToDefaultIanaId("Central Standard Time", QLocale::Canada),
QByteArray("America/Winnipeg"));
- QCOMPARE(QTimeZone::windowsIdToDefaultOlsenId("Central Standard Time", QLocale::AnyCountry),
+ QCOMPARE(QTimeZone::windowsIdToDefaultIanaId("Central Standard Time", QLocale::AnyCountry),
QByteArray("CST6CDT"));
- QCOMPARE(QTimeZone::windowsIdToDefaultOlsenId(QByteArray()), QByteArray());
+ QCOMPARE(QTimeZone::windowsIdToDefaultIanaId(QByteArray()), QByteArray());
// No country is sorted list of all zones
QList<QByteArray> list;
@@ -406,39 +406,39 @@ void tst_QTimeZone::windowsId()
<< "America/North_Dakota/Center" << "America/North_Dakota/New_Salem"
<< "America/Rainy_River" << "America/Rankin_Inlet" << "America/Resolute"
<< "America/Winnipeg" << "CST6CDT";
- QCOMPARE(QTimeZone::windowsIdToOlsenIds("Central Standard Time"), list);
+ QCOMPARE(QTimeZone::windowsIdToIanaIds("Central Standard Time"), list);
// Check country with no match returns empty list
list.clear();
- QCOMPARE(QTimeZone::windowsIdToOlsenIds("Central Standard Time", QLocale::NewZealand),
+ QCOMPARE(QTimeZone::windowsIdToIanaIds("Central Standard Time", QLocale::NewZealand),
list);
// Check valid country returns list in preference order
list.clear();
list << "America/Winnipeg" << "America/Rainy_River" << "America/Rankin_Inlet"
<< "America/Resolute";
- QCOMPARE(QTimeZone::windowsIdToOlsenIds("Central Standard Time", QLocale::Canada), list);
+ QCOMPARE(QTimeZone::windowsIdToIanaIds("Central Standard Time", QLocale::Canada), list);
list.clear();
list << "America/Matamoros";
- QCOMPARE(QTimeZone::windowsIdToOlsenIds("Central Standard Time", QLocale::Mexico), list);
+ QCOMPARE(QTimeZone::windowsIdToIanaIds("Central Standard Time", QLocale::Mexico), list);
list.clear();
list << "America/Chicago" << "America/Indiana/Knox" << "America/Indiana/Tell_City"
<< "America/Menominee" << "America/North_Dakota/Beulah" << "America/North_Dakota/Center"
<< "America/North_Dakota/New_Salem";
- QCOMPARE(QTimeZone::windowsIdToOlsenIds("Central Standard Time", QLocale::UnitedStates),
+ QCOMPARE(QTimeZone::windowsIdToIanaIds("Central Standard Time", QLocale::UnitedStates),
list);
list.clear();
list << "CST6CDT";
- QCOMPARE(QTimeZone::windowsIdToOlsenIds("Central Standard Time", QLocale::AnyCountry),
+ QCOMPARE(QTimeZone::windowsIdToIanaIds("Central Standard Time", QLocale::AnyCountry),
list);
// Check no windowsId return empty
list.clear();
- QCOMPARE(QTimeZone::windowsIdToOlsenIds(QByteArray()), list);
- QCOMPARE(QTimeZone::windowsIdToOlsenIds(QByteArray(), QLocale::AnyCountry), list);
+ QCOMPARE(QTimeZone::windowsIdToIanaIds(QByteArray()), list);
+ QCOMPARE(QTimeZone::windowsIdToIanaIds(QByteArray(), QLocale::AnyCountry), list);
}
void tst_QTimeZone::utcTest()