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

TestCase's expectFail() and expectFailContinue() functions don't work as expected

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12
    • Fix Version/s: None
    • Component/s: Testing: QuickTest
    • Labels:
      None

      Description

      The comments below explain the issue:

      import QtQuick 2.2
      import QtTest 1.0
      
      TestCase {
          id: testCase
          width: 200
          height: 200
          visible: true
          when: windowShown
      
          function test_expectFail() {
              // XFAIL, as expected.
              expectFailContinue("", "Should fail")
              compare(1, 2)
      
              // Should be XFAIL, but is regular FAIL!
              expectFailContinue("", "Should fail")
              tryVerify(123)
      
              // Should be XFAIL, but is regular FAIL!
              expectFailContinue("", "Should fail")
              fail("oops")
          }
      }
      

        Attachments

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

          Activity

            People

            • Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              mitch_curtis Mitch Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes