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

QtTest comparing two urls gives wrong results

    XMLWordPrintable

Details

    Description

      Comparing two URLs with compare() seems to always pass with QtTest - even when the URLs are not the same. Works as expected with verify()

      import QtQuick 2.0
      import QtTest 1.0
      
      Item {
          resources: TestCase {
              name: "URL"
      
              function test_url_compare() {
                  // passes even though should fail!
                  compare(Qt.resolvedUrl("a"), Qt.resolvedUrl("b"))
              }
              function test_url_verify() {
                  // fails as it should
                  verify(Qt.resolvedUrl("a") == Qt.resolvedUrl("b"))
              }
         }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              charles Charles Yin (closed Nokia identity) (Inactive)
              skananoj Sami Kananoja
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes