summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/fileandtokenactions_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Fix compilation.Christian Kandeler2014-07-101-0/+2
| | | | | Change-Id: Id28fc26df5028b92a311bbbdaf032a655b97070a Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* Reinvent deprecated qSort as Utils::sortNikita Baryshnikov2014-06-191-2/+2
| | | | | | | Change-Id: I4f6011cc2b6127037249aabc2426a88ad7108ebf Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* CppTools: Unexport some internal classes.Nikolai Kosjar2014-06-101-2/+2
| | | | | | | | | | | | | | | | Unexports CppModelManager, CppSourceProcessor and CppToolsPlugin. Now only some constructor signatures mention "Internal::" in the exported symbols: % nm --extern-only --demangle ./lib/qtcreator/plugins/libCppTools.so | grep "Internal::" CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*) CppTools::CppClassesFilter::CppClassesFilter(CppTools::Internal::CppLocatorData*) CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*) CppTools::CppEditorSupport::CppEditorSupport(CppTools::Internal::CppModelManager*, TextEditor::BaseTextEditor*) Change-Id: I167c21a6dc03cf02230c95fde66cf404e40df36f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: TranslationUnit::getPosition takes utf16char offsetsNikolai Kosjar2014-05-231-2/+2
| | | | | | | | | ...and not byte offsets anymore. This is necessary in order to calculate the line and column numbers correctly with respect to unicode code points. Change-Id: I5d79857b3eaefeb8d563b4f1e3938a64debc5e08 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Pass some values by referenceOrgad Shaneh2014-05-211-3/+5
| | | | | Change-Id: I18af0c97c22ef2189ebaeaacd32030b22f838c3d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* C++: Clarify units of a TokenNikolai Kosjar2014-05-151-2/+2
| | | | | | | | | | | | | This will avoid confusion when later more length and indices methods are added. In Token: length() --> bytes() begin() --> bytesBegin() end() --> bytesEnd() Change-Id: I244c69b022e239ee762b4114559e707f93ff344f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: Use getter functions of TokenNikolai Kosjar2014-05-151-2/+2
| | | | | | | They are already inlined. Now it's easier to find read-only accesses. Change-Id: I9aaeca3bc5860e3a20a536a2484925e4334c005f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* DocumentModel: Make interface statichjk2014-05-131-4/+4
| | | | | | | Move item model implementation to private, adjust user code. Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* CppEditor: Move InsertVirtualMethods to its own fileOrgad Shaneh2014-01-241-5/+2
| | | | | | | | It contains many components, doesn't make sense to have it with all other quickfixes. Change-Id: Idede14c90ba9b612ae9e9048f5795d674811acfe Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | CppEditor/CppTools: Don't continue in test function on failureNikolai Kosjar2014-01-071-54/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | QVERIFY/QCOMPARE are meant to be called in the test function so that on failure they just can "return" and thus skip subsequent code. Since we use reusable test code in the test functions (the *TestCase classes), we need to ensure that on failure no further test code is executed. This mostly inlines the run function of the test classes into the constructor. Change-Id: I320ee032bdde0174ddfe3fdf3f9e18e19abf1d7f Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Introduce Test{Case,Document}Nikolai Kosjar2014-01-071-24/+30
| | | | | | | | | | | | | | Move common functionality of the 12 test classes into base classes. Change-Id: If64d3cec876807ac6f991151189860a99b8ff4ca Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Merge BaseTextEditorWidget::editorDocument() and ::baseTextDocument()Eike Ziller2013-12-181-2/+1
|/ | | | | | | | Doesn't really make sense to have the additional IDocument *editorDocument() method. Change-Id: I0a7420eb1afaa76f63c3f7e9c4b373acf624ffb9 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* C++: change working-copy to work on UTF-8 encoded QByteArrays.Erik Verbruggen2013-09-111-1/+1
| | | | | | | | | | | | These not only take less space than UTF-16 encoded QStrings, but due to the caching in the CppEditorSupport also take less time to build. This patch also fixes a number of possible encoding issues, where files and constant strings were (falsely) assumed to be UTF-8. Change-Id: Ib6f91c9a94ebed5b5dfbd4eb2998825c62c72784 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* EditorManager: Use static pattern, adjust surrounding codehjk2013-08-301-17/+10
| | | | | Change-Id: I3255a0150cd9a730336456c5a9f986eb74fefbff Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Remove unused local variableKai Koehne2013-08-061-2/+1
| | | | | | | Fix MSVC warning C4189: 'em' : local variable is initialized but not referenced Change-Id: I8b86dc95c1e05302909bb35c22949931db774c2a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Merge remote-tracking branch 'origin/2.8'Oswald Buddenhagen2013-07-251-2/+16
|\ | | | | | | | | | | | | Conflicts: src/plugins/cpptools/cppmodelmanager.cpp Change-Id: I0e69dfad951eb81d8008f5ca05e8fb6999ae2c8a
| * CppEditor: Tests: Fix blocking the token tests by a pop upNikolai Kosjar2013-07-231-2/+16
| | | | | | | | | | | | | | | | Now the used QuickFixFactory InsertVirtualMethods is configured to not generate any pop ups. Change-Id: I36d297678d87e6fb2eb0a73fea6384f0eb7e21f0 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* | CppEditor tests: work on documents instead of editorsEike Ziller2013-07-121-13/+12
|/ | | | | Change-Id: I27964a585996f9838a87856fd68067ce29ce755a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppEditor: Rename CppPlugin to CppEditorPluginNikolai Kosjar2013-04-191-15/+15
| | | | | | Change-Id: Icebf85ae425f413ed0d3dfc873869665233ec58c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppEditor: Tests: Auto configure projects for file/token tests.Nikolai Kosjar2013-04-121-0/+28
| | | | | | Change-Id: Ic781fcbd3bdc1619db38e282ec7d4b9aecdb5bbc Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: David Schulz <david.schulz@digia.com>
* cpp/fileandtokenactions: fix qt4 compilationFawzi Mohamed2013-04-111-1/+6
| | | | | Change-Id: Ic55e5e79c5707aa8e19be32f282d679e4e9be627 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* C++: Tests: Add stupid "do xyz for each file/token" testsNikolai Kosjar2013-04-111-0/+560
Introduce tests that execute test actions on each word/token of each file from every loaded project. Currently, besides just opening files and moving token by token through the files, the following basic actions from the CppTools and CppEditor plugin are executed for each token: - Follow Symbol Under Cursor - Switch Declaration/Definition - Find Usages - Rename Symbol Under Cursor - Open Type Hierarchy - Invoke Completion - Trigger a quick fix in this scope (+perform) Note that (1) These tests are meant to detect corner cases for which Qt Creator crashes or outputs QTC_ASSERTS. Correct behavior is not tested. (2) These tests operate on the loaded projects. Therefore, projects should be specified on the command line or should be loaded by the session manager. Depending on the projects size, these tests might be quite time consuming and are therefore candidates for nightly tests. Suggested test projects are qtcreator.pro, qtbase.pro. Change-Id: I550776b3d56acb17ab337da068d409bfc21e997a Reviewed-by: David Schulz <david.schulz@digia.com>