qt5base-lts/tests/auto/corelib/tools/qlocale
Edward Welbourne 017ac02ec4 Clean up time-zone matching logic in tst_QLocale::macDefaultLocale()
The test was computing GMT with a suffix added to it for the offset;
but when the offset is zero there's no need for it.  Cleaned up the
logic so that it only checks for a "padded to two digits with zero" if
the number is single-digit (and use string arithmetic in preference to
wantonly complex .arg()ing; and use simpler names).  Since we don't
try to check anything unless GMT does appear in the string (because
the actual zone ID was used, instead of GMT with an offset), the case
of zero offset has nothing more to check than that GMT was present,
the precondition for checking anything.

Task-number: QTBUG-70322
Change-Id: I0b8abe7e63d9d72fa9cf32f188b47a78a849044b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-11 14:40:22 +00:00
..
syslocaleapp Updated license headers 2016-01-21 18:55:18 +00:00
test Make tests compile for Android 2018-06-25 08:01:19 +00:00
.gitignore Moving relevant tests to corelib/tools 2011-09-01 13:07:23 +02:00
BLACKLIST Blacklist two tests on macOS that a planned CI change shall break 2018-08-24 17:30:01 +00:00
qlocale.pro Fix compilation for WinRT 2015-12-14 08:43:15 +00:00
tst_qlocale.cpp Clean up time-zone matching logic in tst_QLocale::macDefaultLocale() 2018-09-11 14:40:22 +00:00