Commit 4df4d1c0 authored by Robert Loehning's avatar Robert Loehning
Browse files

Squish: Added test for automatic conversion from "." to "->"



Change-Id: Ib1cd24818b691fc4ccd43b60ff4afdd4e0394fde
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 37a95617
......@@ -105,6 +105,8 @@
:QtSupport__Internal__QtVersionManager.QLabel {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' type='QLabel' unnamed='1' visible='1'}
:QtSupport__Internal__QtVersionManager.qmake_QLabel {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='qmakePath' type='QLabel' visible='1'}
:QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget {container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='qtdirList' type='QTreeWidget' visible='1'}
:Revert to Saved.Proceed_QPushButton {text='Proceed' type='QPushButton' unnamed='1' visible='1' window=':Revert to Saved_QMessageBox'}
:Revert to Saved_QMessageBox {text?='You will lose your current changes if you proceed reverting*' type='QMessageBox' unnamed='1' visible='1'}
:Startup.contextHelpComboBox_QComboBox {container=':Form.Startup_QGroupBox' name='contextHelpComboBox' type='QComboBox' visible='1'}
:Symbol Server_Utils::CheckableMessageBox {type='Utils::CheckableMessageBox' unnamed='1' visible='1' windowTitle='Symbol Server'}
:addToVersionControlComboBox_QComboBox {name='addToVersionControlComboBox' type='QComboBox' visible='1'}
......
AUT=qtcreator
CLASS=
CLASSPATH=
CWD=
ENVVARS=envvars
HOOK_SUB_PROCESSES=false
IMPLICITAUTSTART=0
LANGUAGE=Python
OBJECTMAP=../objects.map
TEST_CASES=tst_memberoperator
VERSION=2
WRAPPERS=Qt
source("../../shared/qtcreator.py")
def main():
startApplication("qtcreator" + SettingsPath)
createProject_Qt_Console(tempDir(), "SquishProject")
selectFromLocator("main.cpp")
cppwindow = waitForObject(":Qt Creator_CppEditor::Internal::CPPEditorWidget")
for record in testData.dataset("usages.tsv"):
include = testData.field(record, "include")
if include:
placeCursorToLine(cppwindow, "#include <QCoreApplication>")
typeLines(cppwindow, ("", "#include " + include))
placeCursorToLine(cppwindow, "return a.exec();")
typeLines(cppwindow, ("<Up>", testData.field(record, "declaration")))
type(cppwindow, testData.field(record, "usage"))
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
"sourceFilesRefreshed(QStringList)")
type(cppwindow, testData.field(record, "operator"))
waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}",
"sourceFilesRefreshed(QStringList)")
test.compare(str(lineUnderCursor(cppwindow)).strip(), testData.field(record, "expected"))
invokeMenuItem("File", 'Revert "main.cpp" to Saved')
clickButton(waitForObject(":Revert to Saved.Proceed_QPushButton"))
invokeMenuItem("File", "Exit")
"include" "declaration" "usage" "operator" "expected"
"" "" "syntaxError" "." "syntaxError."
"" "" "argc" "." "argc."
"" "" "argv[0]" "." "argv[0]."
"" "QCoreApplication qa;" "qa" "." "qa."
"" "QCoreApplication *p;" "p" "." "p->"
"" "QCoreApplication &ref = a;" "ref" "." "ref."
"<QPointer>" "QPointer p;" "p" "." "p."
"<QPointer>" "QPointer *poi;" "poi" "." "poi->"
"<QPointer>" "QPointer &poi;" "poi" "." "poi."
"<QPointer>" "QPointer poi[5];" "poi[2]" "." "poi[2]."
"<QPointer>" "QPointer *poi[5];" "poi[2]" "." "poi[2]->"
"<memory>" "std::auto_ptr sap;" "sap" "." "sap."
"<memory>" "std::auto_ptr *sap;" "sap" "." "sap->"
"<memory>" "std::auto_ptr &sap;" "sap" "." "sap."
"<memory>" "std::auto_ptr sap[10];" "sap[2]" "." "sap[2]."
"<memory>" "std::auto_ptr *sap[10];" "sap[2]" "." "sap[2]->"
"<QVector>" "QVector<QCoreApplication> vec;" "vec" "." "vec."
"<QVector>" "QVector<QCoreApplication *> vec;" "vec" "." "vec."
"<QVector>" "QVector<QCoreApplication> *vec;" "vec" "." "vec->"
"<QVector>" "QVector<QCoreApplication *> *vec;" "vec" "." "vec->"
"<QVector>" "QVector<QCoreApplication> vec;" "vec[0]" "." "vec[0]."
"<QVector>" "QVector<QCoreApplication *> vec;" "vec[0]" "." "vec[0]->"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment