diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-08-25 17:34:11 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-08-27 13:46:45 +0000 |
commit | 59d2f96cf84e971155c255332afc663963fc6c51 (patch) | |
tree | 3d2ddefd70c8599b54308378fc5b3063658c18a5 /src/plugins/cppeditor/cppuseselections_test.cpp | |
parent | a952500e902eb0a0fe5b5dbcdafb6cb66fb88141 (diff) | |
download | qt-creator-59d2f96cf84e971155c255332afc663963fc6c51.tar.gz |
CppEditor: Use test objects to group related test functions
Change-Id: I65089f2a00d8d168f123becf160f82bfcca4c68c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppuseselections_test.cpp')
-rw-r--r-- | src/plugins/cppeditor/cppuseselections_test.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/cppeditor/cppuseselections_test.cpp b/src/plugins/cppeditor/cppuseselections_test.cpp index 1bf53c3799..07fdab8083 100644 --- a/src/plugins/cppeditor/cppuseselections_test.cpp +++ b/src/plugins/cppeditor/cppuseselections_test.cpp @@ -23,9 +23,10 @@ ** ****************************************************************************/ +#include "cppuseselections_test.h" + #include "cppeditor.h" #include "cppeditorwidget.h" -#include "cppeditorplugin.h" #include "cppeditortestcase.h" #include <cpptools/cppmodelmanager.h> @@ -157,9 +158,7 @@ SelectionList UseSelectionsTestCase::waitForUseSelections(bool *hasTimedOut) con return toSelectionList(extraSelections); } -} // namespace Tests - -void CppEditorPlugin::test_useSelections_data() +void SelectionsTest::testUseSelections_data() { QTest::addColumn<QByteArray>("source"); QTest::addColumn<SelectionList>("expectedSelections"); @@ -249,7 +248,7 @@ void CppEditorPlugin::test_useSelections_data() << macroUseSelections; } -void CppEditorPlugin::test_useSelections() +void SelectionsTest::testUseSelections() { QFETCH(QByteArray, source); QFETCH(SelectionList, expectedSelections); @@ -258,7 +257,7 @@ void CppEditorPlugin::test_useSelections() Tests::UseSelectionsTestCase(testDocument, expectedSelections); } -void CppEditorPlugin::test_selectionFiltering_data() +void SelectionsTest::testSelectionFiltering_data() { QTest::addColumn<QString>("source"); QTest::addColumn<SelectionList>("original"); @@ -284,7 +283,7 @@ void CppEditorPlugin::test_selectionFiltering_data() << SelectionList{{3, 4, 27}, {4, 8, 11}, {5, 4, 1}}; } -void CppEditorPlugin::test_selectionFiltering() +void SelectionsTest::testSelectionFiltering() { QFETCH(QString, source); QFETCH(SelectionList, original); @@ -323,5 +322,6 @@ void CppEditorPlugin::test_selectionFiltering() } } +} // namespace Tests } // namespace Internal } // namespace CppEditor |