forked from qt-creator/qt-creator
Squish: Run tst_CSUP03 with Clang code model, too
Change-Id: I5b240b2fbd7999b2228871ddf8faa72509c49465 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -64,7 +64,7 @@ def constructExpectedCode(original, codeLines, funcSuffix):
|
||||
return "\n".join(tmp) + "\n"
|
||||
|
||||
def main():
|
||||
startApplication("qtcreator" + SettingsPath)
|
||||
startCreatorTryingClang()
|
||||
if not startedWithoutPluginError():
|
||||
return
|
||||
projectName = createNewNonQtProject()
|
||||
@@ -82,6 +82,12 @@ def main():
|
||||
"while with braces" : ["", "int dummy = 0;", "while (dummy < 10) {", "++dummy;"],
|
||||
"do while" : ["", "int dummy = 0;", "do", "++dummy;", "while (dummy < 10);"]
|
||||
}
|
||||
models = iterateAvailableCodeModels()
|
||||
for current in models:
|
||||
if current != models[0]:
|
||||
selectCodeModel(current)
|
||||
test.log("Testing code model: %s" % current)
|
||||
openDocument("untitled.Sources.main\\.cpp")
|
||||
editor = getEditorForFileSuffix("main.cpp")
|
||||
if not editor:
|
||||
test.fatal("Failed to get an editor - leaving test.")
|
||||
@@ -115,5 +121,6 @@ def main():
|
||||
test.compare(modifiedCode, expectedCode, "Verifying whether code matches expected.")
|
||||
# reverting to initial state of main.cpp
|
||||
revertMainCpp()
|
||||
invokeMenuItem('File', 'Close All')
|
||||
|
||||
invokeMenuItem('File', 'Exit')
|
||||
|
Reference in New Issue
Block a user