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 <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2024-02-27 18:20:33 +01:00
parent 68dab97bc5
commit 576747d623

View File

@@ -396,6 +396,12 @@ F2TestCase::F2TestCase(CppEditorAction action,
BaseTextEditor *currentTextEditor = dynamic_cast<BaseTextEditor*>(currentEditor); BaseTextEditor *currentTextEditor = dynamic_cast<BaseTextEditor*>(currentEditor);
QVERIFY(currentTextEditor); 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()); QCOMPARE(currentTextEditor->document()->filePath(), targetTestFile->filePath());
int expectedLine, expectedColumn; int expectedLine, expectedColumn;
if (useClangd && expectedVirtualFunctionProposal.size() == 1) { if (useClangd && expectedVirtualFunctionProposal.size() == 1) {
@@ -496,6 +502,7 @@ void FollowSymbolTest::initTestCase()
// Find suitable kit. // Find suitable kit.
// Qt is not actually required for the tests, but we need it for consistency with // Qt is not actually required for the tests, but we need it for consistency with
// configureAsExampleProject(). // configureAsExampleProject().
// FIXME: Make configureAsExampleProject() work with non-Qt kits.
F2TestCase::m_testKit = Utils::findOr(KitManager::kits(), nullptr, [](const Kit *k) { F2TestCase::m_testKit = Utils::findOr(KitManager::kits(), nullptr, [](const Kit *k) {
return k->isValid() && !k->hasWarning() && k->value("QtSupport.QtInformation").isValid(); return k->isValid() && !k->hasWarning() && k->value("QtSupport.QtInformation").isValid();
}); });