CppEditor: Use test objects to group related test functions

Change-Id: I65089f2a00d8d168f123becf160f82bfcca4c68c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2021-08-25 17:34:11 +02:00
parent a952500e90
commit 59d2f96cf8
21 changed files with 701 additions and 514 deletions

View File

@@ -45,7 +45,13 @@
#include <coreplugin/editormanager/ieditorfactory.h>
#ifdef WITH_TESTS
# include "cppdoxygen_test.h"
#include "cppdoxygen_test.h"
#include "cppincludehierarchy_test.h"
#include "cppinsertvirtualmethods.h"
#include "cppquickfix_test.h"
#include "cppuseselections_test.h"
#include "fileandtokenactions_test.h"
#include "followsymbol_switchmethoddecldef_test.h"
#endif
#include <coreplugin/actionmanager/actioncontainer.h>
@@ -392,12 +398,21 @@ void CppEditorPluginPrivate::inspectCppCodeModel()
}
}
#ifdef WITH_TESTS
QVector<QObject *> CppEditorPlugin::createTestObjects() const
{
return {new Tests::DoxygenTest};
}
return {
#ifdef WITH_TESTS
new FollowSymbolTest,
new Tests::AutoCompleterTest,
new Tests::DoxygenTest,
new Tests::FileAndTokenActionsTest,
new Tests::IncludeHierarchyTest,
new Tests::InsertVirtualMethodsTest,
new Tests::QuickfixTest,
new Tests::SelectionsTest,
#endif
};
}
void CppEditorPlugin::openTypeHierarchy()
{