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

QtTest comparing two urls gives wrong results

XMLWordPrintable

      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"))
              }
         }
      }
      

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes