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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12
    • Testing: QuickTest
    • 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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            mitch_curtis Mitch Curtis
            Votes:
            10 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes