Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-104000

As a user of QTestLib, I want to use QCOMPARE_op with fuzzy FP comparisons

XMLWordPrintable

    • Icon: User Story User Story
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • None
    • Testing: qtestlib
    • None
    • All
    • 21
    • Foundation PM Prioritized

      I have tried to migrate from QCOMPARE to QCOMPARE_EQ}, and from {{QVERIFY(a op b) to QCOMPARE_op(a, b). This works fine in most cases, but there are several gotchas in the Floating-Point domain I encountered that I couldn't port because QCOMPARE_EQ always uses op==:

      1. comparing to NaN now uses IEEE semantics (so (Nan == NaN) == false). With QCOMPARE, NaNs compared equal
      2. I was hoping to find a replacement for QVERIFY(qFuzzeCompare()), maybe you can add a QFUZZY_COMPARE_op, too?

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cnn Qt Core & Network
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes