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

Details

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

    Description

      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?

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes