From 576747d6239f3f47e267e1e614cc5f295ec4b8e2 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 27 Feb 2024 18:20:33 +0100 Subject: [PATCH] CppEditor: Mark some tests as XFAIL when running with clangd These are fuzzy decl/def switches, where clangd does not fail, but returns the original location. Change-Id: I86814c2dc5e1b8ec9085fd1486c0120e2f98a3b6 Reviewed-by: Christian Stenger --- .../cppeditor/followsymbol_switchmethoddecldef_test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index 6597a261c47..9bef50b0b8a 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -396,6 +396,12 @@ F2TestCase::F2TestCase(CppEditorAction action, BaseTextEditor *currentTextEditor = dynamic_cast(currentEditor); QVERIFY(currentTextEditor); + if (useClangd) { + QEXPECT_FAIL("matchFunctionSignatureFuzzy1Forward", "clangd returns decl loc", Abort); + QEXPECT_FAIL("matchFunctionSignatureFuzzy2Forward", "clangd returns decl loc", Abort); + QEXPECT_FAIL("matchFunctionSignatureFuzzy1Backward", "clangd returns def loc", Abort); + QEXPECT_FAIL("matchFunctionSignatureFuzzy2Backward", "clangd returns def loc", Abort); + } QCOMPARE(currentTextEditor->document()->filePath(), targetTestFile->filePath()); int expectedLine, expectedColumn; if (useClangd && expectedVirtualFunctionProposal.size() == 1) { @@ -496,6 +502,7 @@ void FollowSymbolTest::initTestCase() // Find suitable kit. // Qt is not actually required for the tests, but we need it for consistency with // configureAsExampleProject(). + // FIXME: Make configureAsExampleProject() work with non-Qt kits. F2TestCase::m_testKit = Utils::findOr(KitManager::kits(), nullptr, [](const Kit *k) { return k->isValid() && !k->hasWarning() && k->value("QtSupport.QtInformation").isValid(); });