summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/benchmarks.pro
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-01-14 20:50:41 +0100
committerEdward Welbourne <edward.welbourne@qt.io>2019-02-06 10:11:22 +0000
commit150c6fb74bb7bc702d1d319a1e9acba6b644944b (patch)
tree71a970f572fe318ae68468096d1ec9161ab8eccc /tests/benchmarks/benchmarks.pro
parentf6edb0ef721c5c3734c2c05352febf0f9003ef6a (diff)
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>
Diffstat (limited to 'tests/benchmarks/benchmarks.pro')
-rw-r--r--tests/benchmarks/benchmarks.pro5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
index 9e288f7aa2..a98b9a62c6 100644
--- a/tests/benchmarks/benchmarks.pro
+++ b/tests/benchmarks/benchmarks.pro
@@ -3,10 +3,11 @@ SUBDIRS = \
corelib \
sql \
-# removed-by-refactor qtHaveModule(opengl): SUBDIRS += opengl
qtHaveModule(dbus): SUBDIRS += dbus
-qtHaveModule(network): SUBDIRS += network
qtHaveModule(gui): SUBDIRS += gui
+qtHaveModule(network): SUBDIRS += network
+# removed-by-refactor qtHaveModule(opengl): SUBDIRS += opengl
+qtHaveModule(testlib): SUBDIRS += testlib
qtHaveModule(widgets): SUBDIRS += widgets
check-trusted.CONFIG += recursive