diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-11-25 10:46:09 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-11-26 02:14:52 +0100 |
commit | 7039fb1e425016ed60383e3752695edbc28a4201 (patch) | |
tree | 208d6d95ef871146db01c4bbed733c0e6da28263 /tests/auto | |
parent | bcc15f36cc87cd53f083d0c6764fa093e89ad940 (diff) |
Skip QTimeZone::checkOffset() if there are no valid zones to test
Change-Id: I62df34fe40b8e89b99912e8ad0d1d2f2f11fd71e
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp b/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp index 2e433270ef..f68aeced2f 100644 --- a/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp +++ b/tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp @@ -671,6 +671,7 @@ void tst_QTimeZone::checkOffset_data() { "Europe/Kiev", "summer", 2017, 10, 27, 12, 0, 0, 2 * 3600, 3600 }, { "Europe/Kiev", "winter", 2017, 10, 29, 12, 0, 0, 2 * 3600, 0 } }; + bool lacksRows = true; for (const auto &entry : table) { QTimeZone zone(entry.zone); if (zone.isValid()) { @@ -679,10 +680,13 @@ void tst_QTimeZone::checkOffset_data() << QDateTime(QDate(entry.year, entry.month, entry.day), QTime(entry.hour, entry.min, entry.sec), zone) << entry.dst + entry.std << entry.std << entry.dst; + lacksRows = false; } else { qWarning("Skipping %s@%s test as zone is invalid", entry.zone, entry.nick); } } + if (lacksRows) + QSKIP("No valid zone info found, skipping test"); } void tst_QTimeZone::checkOffset() |