summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/testlib/tst_testlib.cpp
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-05-30 12:50:44 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-06-03 20:37:51 +0000
commit1e36eedb7f6d312f439aa3d1b1529e7fd672d81a (patch)
treee90b0229124b94cff683969d14705a0f9ea9c5dd /tests/auto/testlib/selftests/testlib/tst_testlib.cpp
parentcc6d984390dc937b9d8440b6ba7d4f578e22ac0d (diff)
tst_QStringApiSymmetry: use QCOMPARE_EQ instead of QCOMPARE
This allows to defer the toString() invocation until it is really needed, and so allows to speed-up the test execution. I was testing a release shared developer build, running tst_QStringApiSymmetry 10 times before the change, and 10 times after the change, and then taking the average execution duration, as reported in the log. Before the change (using QCOMPARE): 51ms After the change (using QCOMPARE_EQ): 45ms As we see from the results, the benefit is around 10%. Task-number: QTBUG-98873 Task-number: QTBUG-98874 Change-Id: Ifcfbcca1f2c1eaf82c7f1a9098fa1512a269cbf8 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'tests/auto/testlib/selftests/testlib/tst_testlib.cpp')
0 files changed, 0 insertions, 0 deletions