diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-05-19 13:22:49 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-06-02 10:52:50 +0000 |
commit | ff0301635e7af28df61104cc5fa15e9c407f257e (patch) | |
tree | 3dc89bfa426033e51036c5ffe801a54bc7d6e70d /src/plugins/cppeditor/cppeditortestcase.h | |
parent | 003ab51c3d6029827c661a4ee2f5834d7505ad0a (diff) |
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=<path to 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 <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppeditortestcase.h')
-rw-r--r-- | src/plugins/cppeditor/cppeditortestcase.h | 5 |
1 files changed, 5 insertions, 0 deletions
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 |