Squish: Made tst_simple_debug more strict

Change-Id: Iac438c8a55c8ea144c682257e140f9370e999e69
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
Robert Loehning
2013-03-08 10:49:14 +01:00
parent b2ef08a5c0
commit f09ce82e23
3 changed files with 6 additions and 2 deletions

View File

@@ -207,10 +207,12 @@ def verifyBreakPoint(bpToVerify):
fileName = bpToVerify.keys()[0]
editor = getEditorForFileSuffix(fileName)
if editor:
test.compare(waitForObject(":DebugModeWidget_QComboBox").toolTip, fileName,
"Verify that the right file is opened")
textPos = editor.textCursor().position()
line = str(editor.plainText)[:textPos].count("\n") + 1
windowTitle = str(waitForObject(":Qt Creator_Core::Internal::MainWindow").windowTitle)
test.verify(fileName in windowTitle,
test.verify(os.path.basename(fileName) in windowTitle,
"Verify that Creator's window title changed according to current file")
return test.compare(line, bpToVerify.values()[0],
"Compare hit breakpoint to expected line number in %s" % fileName)