From ff0301635e7af28df61104cc5fa15e9c407f257e Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 19 May 2021 13:22:49 +0200 Subject: CppEditor: Tweak test infrastructure ... so we can re-use the "follow symbol" test cases with clangd. Call Creator like this (clangd needs to be version 12 or later): $ QTC_CLANGD= qtcreator -test 'CppEditor,*Follow*,*Switch*' -test 'ClangCodeModel,*dummy*' During testing, some invalid code in the test cases was uncovered and fixed. Change-Id: I9dc650fdba2a27600e6a550420ee873f6fb31d23 Reviewed-by: David Schulz --- src/plugins/cppeditor/cppeditortestcase.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/plugins/cppeditor/cppeditortestcase.h') diff --git a/src/plugins/cppeditor/cppeditortestcase.h b/src/plugins/cppeditor/cppeditortestcase.h index 6eb9821bdd..519b7cbafd 100644 --- a/src/plugins/cppeditor/cppeditortestcase.h +++ b/src/plugins/cppeditor/cppeditortestcase.h @@ -62,12 +62,17 @@ public: TestCase(bool runGarbageCollector = true); ~TestCase(); + void setUseClangd(); + static bool openCppEditor(const QString &fileName, CppEditor **editor, CppEditorWidget **editorWidget = 0); static CPlusPlus::Document::Ptr waitForRehighlightedSemanticDocument( CppEditorWidget *editorWidget); + +private: + const bool m_prevUseClangd; }; } // namespace Tests -- cgit v1.2.3