qt5base-lts/tests/auto
Edward Welbourne 150c6fb74b Add testlib selftests for double and for non-finite float and double
Tidied up the existing float tests in the process.
(In particular, s/SUCCESS/PASS/ since that matches real test output.)
These verify that QCOMPARE() handles floats and doubles as intended.
Extended the existing qFuzzyCompare tests to probe the boundaries of
the ranges of values of both types, in the process.

Revised the toString<double> that qCompare() uses to give enough
precision to actually show some of the differences being tested there
(12 digits, to match what qFuzzyCompare tests, so as to show different
values rather than, e.g. 1e12 for both expected and actual) and to
give consistent results for infinities and NaN (MinGW had eccentric
versions for these, leading to different output from tests, which thus
failed); did the latter also for toString<float> and fixed stray zeros
in MinGW's exponents (which made a kludge in tst_selftest.cpp
redundant, so I removed that, too).

That's further complicated handling of floating-point types, so let's
just keep an eye on how expensive that's getting by adding a benchmark
test for QTest::toString().  Unfortunately, default settings only get
runs that take modest numbers of milliseconds (some as low as 40)
while increasing this with -minumumvalue 100 or more gets the process
killed - and I'm unable to find out who's doing the killing (it's not
QProcess::kill, ::kill or the QtTest WatchDog, as far as I can tell).
So results are rather noisy; the integral tests exhibit speed-ups by
factors up to 5, and slow-downs by factors up to 100, between runs
with and without this change, which does not affec the integral tests.
The relatively modest slow-downs and speed-ups in the floating point
tests thus seem likely to be happenstance rather than signal.

Change-Id: I4a6bbbab6a43bf14a4089e96238a7c8da2c3127e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-02-06 10:11:22 +00:00
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Add binary compatibility files for 5.12 for QtBase 2018-12-21 19:42:57 +00:00
cmake Export modules' enabled/disabled features to cmake 2018-09-28 13:10:28 +00:00
concurrent Merge remote-tracking branch 'origin/5.11' into dev 2018-02-16 08:54:58 +01:00
corelib Blacklist qtimer/basic_chrono on macos due to flakiness 2019-01-30 10:10:19 +00:00
dbus Fix wrong relative path to qdbus_symbols.cpp 2018-07-24 04:24:31 +00:00
gui Fix QColor::toCmyk() for rgb(0, 0, 0) 2019-02-05 22:47:33 +00:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network tst_qsslsocket - blacklist several test temporarily 2019-01-24 20:38:14 +00:00
opengl qWaitFor: Prevent being stuck in QCoreApplication::processEvents 2019-01-09 18:10:54 +00:00
other Painter path stroking: fix capping of beziers ending in tight turns 2019-02-05 22:47:16 +00:00
printsupport tst_QPrinter: stabilize qprinter test 2019-01-20 13:39:54 +00:00
shared Read font selection flags and use them when querying for metrics 2018-11-30 16:15:03 +00:00
sql Replace executedQuery when executing a new query 2019-01-30 23:08:04 +00:00
testlib Add testlib selftests for double and for non-finite float and double 2019-02-06 10:11:22 +00:00
tools qmake: add $$read_registry() function 2019-01-05 20:33:07 +00:00
widgets Improve keyboard navigation in QListView when isWrapping is enabled 2019-02-06 09:50:58 +00:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro winrt: Skip network auto tests for now 2018-06-22 05:02:39 +00:00
network-settings.h Rework QNetworkReply tests to use docker-based test servers 2018-07-27 17:40:27 +00:00
testserver.pri Postpone testing docker images and files until running 'make check' 2018-08-30 04:06:51 +00:00