forked from qt-creator/qt-creator
ClangCodeModel: Add XFAIL-ing test for clangd completion
Change-Id: Ic8672d5ce14b9a8d86dc511c5aa3289037258d64 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1431,7 +1431,8 @@ ClangdTestCompletion::ClangdTestCompletion()
|
|||||||
"membercompletion-inside.cpp", "membercompletion-outside.cpp",
|
"membercompletion-inside.cpp", "membercompletion-outside.cpp",
|
||||||
"noDotToArrowCorrectionForFloats.cpp",
|
"noDotToArrowCorrectionForFloats.cpp",
|
||||||
"preprocessorKeywordsCompletion.cpp", "preprocessorKeywordsCompletion2.cpp",
|
"preprocessorKeywordsCompletion.cpp", "preprocessorKeywordsCompletion2.cpp",
|
||||||
"preprocessorKeywordsCompletion3.cpp", "signalCompletion.cpp"});
|
"preprocessorKeywordsCompletion3.cpp", "privateFuncDefCompletion.cpp",
|
||||||
|
"signalCompletion.cpp"});
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClangdTestCompletion::initTestCase()
|
void ClangdTestCompletion::initTestCase()
|
||||||
@@ -1664,6 +1665,18 @@ void ClangdTestCompletion::testCompleteClassAndConstructor()
|
|||||||
QCOMPARE(manipulator.skipPos(), -1);
|
QCOMPARE(manipulator.skipPos(), -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClangdTestCompletion::testCompletePrivateFunctionDefinition()
|
||||||
|
{
|
||||||
|
ProposalModelPtr proposal;
|
||||||
|
getProposal("privateFuncDefCompletion.cpp", proposal);
|
||||||
|
|
||||||
|
QVERIFY(proposal);
|
||||||
|
QEXPECT_FAIL("", "FIXME: clangd needs to differentiate "
|
||||||
|
"between function call and function definiton", Abort);
|
||||||
|
QCOMPARE(proposal->size(), 1);
|
||||||
|
QVERIFY(hasItem(proposal, " theFunc()"));
|
||||||
|
}
|
||||||
|
|
||||||
void ClangdTestCompletion::testCompleteWithDotToArrowCorrection()
|
void ClangdTestCompletion::testCompleteWithDotToArrowCorrection()
|
||||||
{
|
{
|
||||||
ProposalModelPtr proposal;
|
ProposalModelPtr proposal;
|
||||||
|
@@ -169,6 +169,7 @@ private slots:
|
|||||||
void testFunctionHintsFiltered();
|
void testFunctionHintsFiltered();
|
||||||
void testFunctionHintConstructor();
|
void testFunctionHintConstructor();
|
||||||
void testCompleteClassAndConstructor();
|
void testCompleteClassAndConstructor();
|
||||||
|
void testCompletePrivateFunctionDefinition();
|
||||||
|
|
||||||
void testCompleteWithDotToArrowCorrection();
|
void testCompleteWithDotToArrowCorrection();
|
||||||
void testDontCompleteWithDotToArrowCorrectionForFloats();
|
void testDontCompleteWithDotToArrowCorrectionForFloats();
|
||||||
|
@@ -53,5 +53,6 @@
|
|||||||
<file>completion/functionAddress.cpp</file>
|
<file>completion/functionAddress.cpp</file>
|
||||||
<file>completion/preprocessorKeywordsCompletion2.cpp</file>
|
<file>completion/preprocessorKeywordsCompletion2.cpp</file>
|
||||||
<file>completion/preprocessorKeywordsCompletion3.cpp</file>
|
<file>completion/preprocessorKeywordsCompletion3.cpp</file>
|
||||||
|
<file>completion/privateFuncDefCompletion.cpp</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@@ -24,6 +24,7 @@ SOURCES = \
|
|||||||
preprocessorKeywordsCompletion.cpp \
|
preprocessorKeywordsCompletion.cpp \
|
||||||
preprocessorKeywordsCompletion2.cpp \
|
preprocessorKeywordsCompletion2.cpp \
|
||||||
preprocessorKeywordsCompletion3.cpp \
|
preprocessorKeywordsCompletion3.cpp \
|
||||||
|
privateFuncDefCompletion.cpp \
|
||||||
signalCompletion.cpp
|
signalCompletion.cpp
|
||||||
|
|
||||||
HEADERS = mainwindow.h
|
HEADERS = mainwindow.h
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
class MyClass {
|
||||||
|
void theFunc();
|
||||||
|
};
|
||||||
|
|
||||||
|
void MyClass::the /* COMPLETE HERE */
|
Reference in New Issue
Block a user