summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont.h
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2017-07-21 15:21:16 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2017-07-25 14:09:03 +0000
commitcff39f181897520f92829adc1e4ed78233d8b7c5 (patch)
treef2fbeb5df8dd4b957d746532263235e82e16e257 /src/gui/text/qfont.h
parent37b0a4d2e14ea167eff5f43ef374defb9a17c3d0 (diff)
tst_QTimeZone: improve readability of code and failure reports
When QCOMPARE(,) reports two 12-digit numbers, it's not always immediately obvious what the difference is (much less what 1/3600000 of it is); nor is it obvious that (or why) a given 12-digit number is in fact correct. In contrast, our eyes can make sense of a QDateTime's reported value quite well, enabling us to see what's different; and it's possible to at least confirm the plausibility of 2-or-3 am on a spring or autumn day at a plausible transition (or even to confirm it exactly by consulting suitable web-sites). Also document the actual transition happening in each case (since I *did* consult a suitable web-site). So prefer to QCOMPARE(,) two QDateTime values instead of two 12-digit qint64s. Where a that would be unsuitable, at least compare the difference to zero, to make the error easier to understand (except when one of the twelve-digit numbers consists entirely of 9s; that, for once, actually is easy to see). Write various multiples of 3600 as the relevant intelligible whole number times 3600, rather than premultiplying, to make it obvious to reders what's going on. None of this changes what is actually tested. Change-Id: I488e751283a55d4623c93612af13ad631144900d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/text/qfont.h')
0 files changed, 0 insertions, 0 deletions