SquishTests: Add log for fail

Makes it easier to figure out what went wrong.

Change-Id: I3b156b750958079d8ff3b465f27886f15ac8b5bc
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Christian Stenger
2024-09-12 10:39:30 +02:00
parent 07000281da
commit 3a0532835a

View File

@@ -46,8 +46,10 @@ def main():
expectedProposals += [" class"] if useClang else ["class"]
test.xcompare(len(shownProposals), len(expectedProposals), # QTCREATORBUG-23159
"Number of proposed templates")
test.verify(set(expectedProposals).issubset(set(shownProposals)),
"Expected proposals shown, ignoring order?")
if not test.verify(set(expectedProposals).issubset(set(shownProposals)),
"Expected proposals shown, ignoring order?"):
test.log("Expected: %s\nvs\nCurrent: %s" % (str(expectedProposals),
str(shownProposals)))
doubleClickItem(listView, usedProposal, 5, 5, 0, Qt.LeftButton)
pattern = ("(?<=class)\s+name\s*:\s*public\s+QObject\s*\{\s*Q_OBJECT\s+"
"public:\s+name\(\)\s*\{\}\s+virtual\s+~name\(\)\s*\{\}\s+\};")