summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@digia.com>2014-09-25 12:13:23 +0200
committerRobert Loehning <robert.loehning@digia.com>2014-09-25 16:02:38 +0200
commit6447eb9cbf73a7520889ded8ad36188a064f005e (patch)
tree5f13d931be7fa330f2c61ec049c96b097525e564
parent4957137ef67ae0352b9a2e1b27f0f8d3089f2c07 (diff)
downloadqt-creator-6447eb9cbf73a7520889ded8ad36188a064f005e.tar.gz
Squish: Run tst_CSUP04 with Clang code model, too
Change-Id: I3a2f029e0f1c85ecbd3c161b097f4e975014f714 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
-rw-r--r--tests/system/suite_CSUP/tst_CSUP04/test.py68
1 files changed, 36 insertions, 32 deletions
diff --git a/tests/system/suite_CSUP/tst_CSUP04/test.py b/tests/system/suite_CSUP/tst_CSUP04/test.py
index dd8fa406d5..280bd65544 100644
--- a/tests/system/suite_CSUP/tst_CSUP04/test.py
+++ b/tests/system/suite_CSUP/tst_CSUP04/test.py
@@ -39,44 +39,48 @@ def main():
# copy example project to temp directory
templateDir = prepareTemplate(sourceExample)
examplePath = os.path.join(templateDir, proFile)
- startApplication("qtcreator" + SettingsPath)
+ startCreatorTryingClang()
if not startedWithoutPluginError():
return
# open example project
openQmakeProject(examplePath)
# wait for parsing to complete
progressBarWait(30000)
- # open .cpp file in editor
- if not openDocument("propertyanimation.Sources.main\\.cpp"):
- test.fatal("Could not open main.cpp")
- invokeMenuItem("File", "Exit")
- return
- test.verify(checkIfObjectExists(":Qt Creator_CppEditor::Internal::CPPEditorWidget"),
- "Verifying if: .cpp file is opened in Edit mode.")
- # place cursor on line "QmlApplicationViewer viewer;"
- editorWidget = findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
- # invoke find usages from context menu on word "viewer"
- if not invokeFindUsage(editorWidget, "QmlApplicationViewer viewer;", "<Left>", 10):
- invokeMenuItem("File", "Exit")
- return
- # wait until search finished and verify search results
- waitForSearchResults()
- validateSearchResult(14)
- result = re.search("QmlApplicationViewer", str(editorWidget.plainText))
- test.verify(result, "Verifying if: The list of all usages of the selected text is displayed in Search Results. "
- "File with used text is opened.")
- # move cursor to the other word and test Find Usages function by pressing Ctrl+Shift+U.
- openDocument("propertyanimation.Sources.main\\.cpp")
- if not placeCursorToLine(editorWidget, "viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);"):
- return
- for i in range(4):
- type(editorWidget, "<Left>")
- type(editorWidget, "<Ctrl+Shift+u>")
- # wait until search finished and verify search results
- waitForSearchResults()
- validateSearchResult(3)
- # exit qt creator
- invokeMenuItem("File", "Save All")
+ models = iterateAvailableCodeModels()
+ for current in models:
+ if current != models[0]:
+ selectCodeModel(current)
+ test.log("Testing code model: %s" % current)
+ # open .cpp file in editor
+ if not openDocument("propertyanimation.Sources.main\\.cpp"):
+ test.fatal("Could not open main.cpp")
+ invokeMenuItem("File", "Exit")
+ return
+ test.verify(checkIfObjectExists(":Qt Creator_CppEditor::Internal::CPPEditorWidget"),
+ "Verifying if: .cpp file is opened in Edit mode.")
+ # place cursor on line "QmlApplicationViewer viewer;"
+ editorWidget = findObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
+ # invoke find usages from context menu on word "viewer"
+ if not invokeFindUsage(editorWidget, "QmlApplicationViewer viewer;", "<Left>", 10):
+ invokeMenuItem("File", "Exit")
+ return
+ # wait until search finished and verify search results
+ waitForSearchResults()
+ validateSearchResult(14)
+ result = re.search("QmlApplicationViewer", str(editorWidget.plainText))
+ test.verify(result, "Verifying if: The list of all usages of the selected text is displayed in Search Results. "
+ "File with used text is opened.")
+ # move cursor to the other word and test Find Usages function by pressing Ctrl+Shift+U.
+ openDocument("propertyanimation.Sources.main\\.cpp")
+ if not placeCursorToLine(editorWidget, "viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);"):
+ return
+ for i in range(4):
+ type(editorWidget, "<Left>")
+ type(editorWidget, "<Ctrl+Shift+u>")
+ # wait until search finished and verify search results
+ waitForSearchResults()
+ validateSearchResult(3)
+ invokeMenuItem("File", "Close All")
invokeMenuItem("File", "Exit")
def waitForSearchResults():