Details
-
User Story
-
Resolution: Done
-
P2: Important
-
None
-
-
8
-
Team A Foundation Sprint 57, Team A Foundation Sprint 58
-
343e0ff485 (qt/qtbase/dev) 343e0ff485 (qt/tqtc-qtbase/dev) 343e0ff485 (qt/tqtc-qtbase/6.4)
Description
For other unit test frameworks, I'm used to having inequality (!=, <, <=, >, >=) treated as first-class assertions. In QTestLib, however, only equality is a first-class assertion (via QCOMPARE) , everything else must be shoe-horned through QVERIFY. This creates problems for me, because, unlike QCOMPARE, QVERIFY doesn't print the values of the RHS and LHS expressions on failure.
I suggest to add QCOMPARE_(EQ,NE,LT,GT,LE,GE) to directly express ==, !=, <, >, <=, and >=, resp.
Yes, QCOMPARE_EQ is then the same as QCOMPARE. Sure me. I like symmetry.
Attachments
Issue Links
- resulted in
-
QTBUG-104000 As a user of QTestLib, I want to use QCOMPARE_op with fuzzy FP comparisons
-
- Open
-
- mentioned in
-
Page Loading...
For Gerrit Dashboard: QTBUG-98873 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
411792,18 | Add QCOMPARE_{EQ,NE,LT,LE,GT,GE}() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
412578,8 | Testlib: teach TAP test logger to support new QCOMPARE_* operators | dev | qt/qtbase | Status: MERGED | +2 | 0 |
413450,11 | tst_QStringApiSymmetry: use QCOMPARE_EQ instead of QCOMPARE | dev | qt/qtbase | Status: MERGED | +2 | 0 |
414126,3 | Add QTRY_COMPARE_{EQ,NE,LT,LE,GT,GE}_WITH_TIMEOUT() | 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 |