Details
-
User Story
-
Resolution: Done
-
P2: Important
-
None
-
-
8
-
Team A Foundation Sprint 58
-
0681a2dd5a (qt/qtbase/dev) 0681a2dd5a (qt/tqtc-qtbase/dev) 0681a2dd5a (qt/tqtc-qtbase/6.4)
Description
Currently, the toString() function is called for each QCOMPARE(), regardless of whether it succeeds or not, even though the result is only needed when the comparison fails. We have tens of thousands of test cases, and the string formatting eats a significant amount of the runtime compared to the (typically trivial) cost of the comparision.
Please change QCOMPARE to only format the expressions on failure.
Attachments
Issue Links
- mentioned in
-
Page Loading...
For Gerrit Dashboard: QTBUG-98874 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
411792,18 | Add QCOMPARE_{EQ,NE,LT,LE,GT,GE}() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
413450,11 | tst_QStringApiSymmetry: use QCOMPARE_EQ instead of QCOMPARE | dev | qt/qtbase | Status: MERGED | +2 | 0 |
413759,17 | QTestLib: rework QTest::compare_helper() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
414216,4 | tst_tostring: add benchmarks for QCOMPARE vs. QCOMPARE_EQ | dev | qt/qtbase | Status: MERGED | +2 | 0 |
417899,2 | tst_tostring: add benchmarks for QCOMPARE vs. QCOMPARE_EQ | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |