Include zone name on tst_QTimeZone::isTimeZoneIdAvailable() failure

The zone name was reported if isValid() failed, but not if
isTimeZoneIdAvailable(), where it also proved useful in uncovering
ICU's use of over-long zone name components.

Change-Id: I4b3b65b1a4a338b638c01fc7ad47294118ee0efc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Edward Welbourne 2022-03-23 14:38:10 +01:00
parent 9e01a9a5d1
commit 57742f7728

View File

@ -402,7 +402,7 @@ void tst_QTimeZone::isTimeZoneIdAvailable()
{
const QList<QByteArray> available = QTimeZone::availableTimeZoneIds();
for (const QByteArray &id : available) {
QVERIFY(QTimeZone::isTimeZoneIdAvailable(id));
QVERIFY2(QTimeZone::isTimeZoneIdAvailable(id), id);
QVERIFY2(QTimeZone(id).isValid(), id);
}
}