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",
|
||||
"noDotToArrowCorrectionForFloats.cpp",
|
||||
"preprocessorKeywordsCompletion.cpp", "preprocessorKeywordsCompletion2.cpp",
|
||||
"preprocessorKeywordsCompletion3.cpp", "signalCompletion.cpp"});
|
||||
"preprocessorKeywordsCompletion3.cpp", "privateFuncDefCompletion.cpp",
|
||||
"signalCompletion.cpp"});
|
||||
}
|
||||
|
||||
void ClangdTestCompletion::initTestCase()
|
||||
@@ -1664,6 +1665,18 @@ void ClangdTestCompletion::testCompleteClassAndConstructor()
|
||||
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()
|
||||
{
|
||||
ProposalModelPtr proposal;
|
||||
|
@@ -169,6 +169,7 @@ private slots:
|
||||
void testFunctionHintsFiltered();
|
||||
void testFunctionHintConstructor();
|
||||
void testCompleteClassAndConstructor();
|
||||
void testCompletePrivateFunctionDefinition();
|
||||
|
||||
void testCompleteWithDotToArrowCorrection();
|
||||
void testDontCompleteWithDotToArrowCorrectionForFloats();
|
||||
|
@@ -53,5 +53,6 @@
|
||||
<file>completion/functionAddress.cpp</file>
|
||||
<file>completion/preprocessorKeywordsCompletion2.cpp</file>
|
||||
<file>completion/preprocessorKeywordsCompletion3.cpp</file>
|
||||
<file>completion/privateFuncDefCompletion.cpp</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -24,6 +24,7 @@ SOURCES = \
|
||||
preprocessorKeywordsCompletion.cpp \
|
||||
preprocessorKeywordsCompletion2.cpp \
|
||||
preprocessorKeywordsCompletion3.cpp \
|
||||
privateFuncDefCompletion.cpp \
|
||||
signalCompletion.cpp
|
||||
|
||||
HEADERS = mainwindow.h
|
||||
|
@@ -0,0 +1,5 @@
|
||||
class MyClass {
|
||||
void theFunc();
|
||||
};
|
||||
|
||||
void MyClass::the /* COMPLETE HERE */
|
Reference in New Issue
Block a user