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

qtextlayout autotest has ifdef's with inverted logic

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.0.0
    • 5.0.0
    • GUI: Text handling
    • None
    • c30ebdeac028a3fe4a820cd5fe8360d11d14868d

    Description

      qtbase/tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp has two blocks of code as follows:

      #if !defined(Q_WS_MAC)
          QSKIP("This test can not be run on Mac");
      #endif
      

      The logic here is erroneously inverted, i.e. the QSKIP is called on all platforms except for Mac (actually, Q_WS_MAC is never defined any more – should now be Q_OS_MAC). If I correct the logic by removing the "!", one of the test functions fails on Linux, suggesting that either the test is incorrect or the code under test is incorrect.

      The QSKIP's were added by commits 37f20ea8 and 9f837af9 in May 2011, but it appears that the CI gate has not been running tests on Mac since the qtbase refactor was merged.

      Attachments

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

        Activity

          People

            jiang Jiang Jiang
            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes