summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-11-11 13:30:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-21 09:25:23 +0100
commit6bf759b31040fb5d05044cd14d5889fbd19a8942 (patch)
tree19c2917507f7379be43d32aa04d2c3237d53b472 /tests
parentfe312204a355025d7e39f0ea9ec4d2994026120a (diff)
QTimeZone - Change Olsen ID to IANA ID
The name Olson was misspelled as Olsen in the public api of QTimeZone which is needed to be fixed before first public release in 5.2 would freeze the api and prevent it being fixed. It has been decided that renaming as IANA ID would be more future-proof. Fixes to the private code will be done separately to keep this patch against release branch to the minimum required. Task-number: QTBUG-34735 Change-Id: I8ee90644862c907f6d1937b8536f0c02583ae736 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests')
-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()