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:
Robert Loehning
2014-09-24 16:31:18 +02:00
parent 4d8002a973
commit 4957137ef6

View File

@@ -64,7 +64,7 @@ def constructExpectedCode(original, codeLines, funcSuffix):
return "\n".join(tmp) + "\n" return "\n".join(tmp) + "\n"
def main(): def main():
startApplication("qtcreator" + SettingsPath) startCreatorTryingClang()
if not startedWithoutPluginError(): if not startedWithoutPluginError():
return return
projectName = createNewNonQtProject() projectName = createNewNonQtProject()
@@ -82,6 +82,12 @@ def main():
"while with braces" : ["", "int dummy = 0;", "while (dummy < 10) {", "++dummy;"], "while with braces" : ["", "int dummy = 0;", "while (dummy < 10) {", "++dummy;"],
"do while" : ["", "int dummy = 0;", "do", "++dummy;", "while (dummy < 10);"] "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") editor = getEditorForFileSuffix("main.cpp")
if not editor: if not editor:
test.fatal("Failed to get an editor - leaving test.") test.fatal("Failed to get an editor - leaving test.")
@@ -115,5 +121,6 @@ def main():
test.compare(modifiedCode, expectedCode, "Verifying whether code matches expected.") test.compare(modifiedCode, expectedCode, "Verifying whether code matches expected.")
# reverting to initial state of main.cpp # reverting to initial state of main.cpp
revertMainCpp() revertMainCpp()
invokeMenuItem('File', 'Close All')
invokeMenuItem('File', 'Exit') invokeMenuItem('File', 'Exit')