Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.8, 5.9.1
-
None
-
99651acdf7f34ad976522f12eb89ea8fc19ee0a5
Description
Comparing two value of type url with compare() seems to always pass with QtTest - even when the URLs are not the same. Works as expected with verify() and using compare() with string.
import QtQuick 2.0 import QtTest 1.0 Item { resources: TestCase { name: "URL" property url path1: "path1" property url path2: "path2" function test_url_compare() { // passes even though should fail! compare(path1, path2) } function test_url_compare_string() { // fails as it should compare(path1.toString(), path2.toString()) } function test_url_verify() { // fails as it should verify(path1 == path2) } } }
Similar to this issue: https://bugreports.qt.io/browse/QTBUG-22255 , but Qt.resolvedUrl() return string type, not url type, then this works with compare().
Attachments
Issue Links
- relates to
-
QTBUG-22255 QtTest comparing two urls gives wrong results
- Closed