MCPcopy Create free account
hub / github.com/KDE/kdevelop / testClangCodeCompletionType

Method testClangCodeCompletionType

plugins/clang/tests/test_codecompletion.cpp:546–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544
545
546void TestCodeCompletion::testClangCodeCompletionType()
547{
548 QFETCH(QString, fileExtension);
549 QFETCH(QString, code);
550 QFETCH(CompletionItems, expectedItems);
551 QFETCH(QString, expedtedItem);
552 QFETCH(QString, expectedType);
553
554 auto executeItem = [=] (const ClangCodeCompletionItemTester& tester) {
555 auto item = tester.findItem(expedtedItem);
556 QVERIFY(item);
557 auto declaration = item->declaration();
558 QVERIFY(declaration);
559 QCOMPARE(declaration->abstractType()->toString(), expectedType);
560 };
561
562 executeCompletionTest(code, expectedItems, NoMacroOrBuiltin, executeItem, fileExtension);
563}
564
565void TestCodeCompletion::testClangCodeCompletionType_data()
566{

Callers

nothing calls this directly

Calls 5

executeCompletionTestFunction · 0.85
findItemMethod · 0.45
declarationMethod · 0.45
toStringMethod · 0.45
abstractTypeMethod · 0.45

Tested by

no test coverage detected