diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2023-11-30 10:14:11 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2023-11-30 14:41:35 +0000 |
commit | 21c078773fcd2fc4eb1b68c23bf507820ae42568 (patch) | |
tree | 21d33bbfacf7a38377b31ceb33aabc65ace0c161 /src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | |
parent | e3e9ca05c535fb9b30f1db0f9730e4b4f6544ca0 (diff) |
CppEditor: Un-skip some tests in clangd mode
These are passing now.
Change-Id: Iec784b9e85a0f06266efff2f301f82891d343d50
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp')
-rw-r--r-- | src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index 0c4d85d887..583d99d096 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -235,14 +235,12 @@ F2TestCase::F2TestCase(CppEditorAction action, const QString tag = QLatin1String(QTest::currentDataTag()); const bool useClangd = m_testKit; if (useClangd) { - if (curTestName == "testFollowSymbolQObjectConnect" - || curTestName == "testFollowSymbolQObjectOldStyleConnect") { - QSKIP("TODO: Implement fall-back"); + if (tag.contains("before keyword") || tag.contains("in keyword") + || tag.contains("before parenthesis")) { + QSKIP("clangd correctly goes to definition of SIGNAL macro"); } if (curTestName == "testFollowClassOperator" && tag == "backward") QSKIP("clangd goes to operator name first"); - if (tag.toLower().contains("fuzzy")) - QSKIP("fuzzy matching is not supposed to work with clangd"); // TODO: Implement fallback as we do with libclang if (tag == "baseClassFunctionIntroducedByUsingDeclaration") QSKIP("clangd points to the using declaration"); if (curTestName == "testFollowClassOperatorInOp") @@ -252,7 +250,7 @@ F2TestCase::F2TestCase(CppEditorAction action, // Write files to disk CppEditor::Tests::TemporaryDir temporaryDir; QVERIFY(temporaryDir.isValid()); - QString projectFileContent = "CppApplication { files: ["; + QString projectFileContent = "QtApplication { files: ["; for (TestDocumentPtr testFile : testFiles) { QVERIFY(testFile->baseDirectory().isEmpty()); testFile->setBaseDirectory(temporaryDir.path()); @@ -331,9 +329,7 @@ F2TestCase::F2TestCase(CppEditorAction action, switch (action) { case FollowSymbolUnderCursorAction: { CppEditorWidget *widget = initialTestFile->m_editorWidget; - if (CppModelManager::isClangCodeModelActive()) { - if (curTestName == "testFollowSymbolQTCREATORBUG7903") - QSKIP((curTestName + " is not supported by Clang FollowSymbol").toLatin1()); + if (useClangd) { widget->enableTestMode(); widget->openLinkUnderCursor(); break; @@ -421,9 +417,16 @@ F2TestCase::F2TestCase(CppEditorAction action, // qDebug() << "Expected line:" << expectedLine; // qDebug() << "Expected column:" << expectedColumn; - if (!useClangd) { + if (useClangd) { + QEXPECT_FAIL("matchFunctionSignature_Follow_8_fuzzy", + "clangd points to declaration", Abort); + QEXPECT_FAIL("matchFunctionSignature_Follow_9_fuzzy", + "clangd points to declaration", Abort); + } else { QEXPECT_FAIL("globalVarFromEnum", "Contributor works on a fix.", Abort); QEXPECT_FAIL("matchFunctionSignature_Follow_5", "foo(int) resolved as CallAST", Abort); + if (tag.contains("SLOT") && tag.contains("no 2nd QObject")) + QEXPECT_FAIL("", "FIXME", Abort); } QCOMPARE(currentTextEditor->currentLine(), expectedLine); @@ -1580,11 +1583,6 @@ void FollowSymbolTest::testFollowSymbolQObjectConnect() if (!secondQObjectParam) source.replace(" &foo, ", QByteArray()); - if (start >= '7' && !secondQObjectParam) { - qWarning("SLOT jump triggers QTCREATORBUG-10265. Skipping."); - return; - } - F2TestCase(F2TestCase::FollowSymbolUnderCursorAction, singleDocument(source)); } |