forked from qt-creator/qt-creator
ClangCodeModel: Fix libclang tests
We must make sure clangd doesn't get in the way. Change-Id: Ica053cce6928920b39602c7c467b5d16f8232fe6 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -35,10 +35,12 @@
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <cppeditor/cppcodemodelsettings.h>
|
||||
#include <cppeditor/cpptoolsreuse.h>
|
||||
#include <cppeditor/cpptoolstestcase.h>
|
||||
#include <cppeditor/modelmanagertesthelper.h>
|
||||
#include <cppeditor/projectinfo.h>
|
||||
#include <languageclient/languageclientmanager.h>
|
||||
#include <texteditor/codeassist/assistproposalitem.h>
|
||||
#include <texteditor/codeassist/genericproposalmodel.h>
|
||||
#include <texteditor/textdocument.h>
|
||||
@@ -514,6 +516,13 @@ namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
namespace Tests {
|
||||
|
||||
void ClangCodeCompletionTest::initTestCase()
|
||||
{
|
||||
CppEditor::ClangdSettings::setUseClangd(false);
|
||||
for (LanguageClient::Client * const c : LanguageClient::LanguageClientManager::clients())
|
||||
LanguageClient::LanguageClientManager::shutdownClient(c);
|
||||
}
|
||||
|
||||
void ClangCodeCompletionTest::testCompleteDoxygenKeywords()
|
||||
{
|
||||
ProjectLessCompletionTest t("doxygenKeywordsCompletion.cpp");
|
||||
|
||||
@@ -38,6 +38,8 @@ class ClangCodeCompletionTest : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
void initTestCase();
|
||||
|
||||
void testCompleteDoxygenKeywords();
|
||||
void testCompletePreprocessorKeywords();
|
||||
void testCompleteIncludeDirective();
|
||||
|
||||
Reference in New Issue
Block a user