| 1429 | } |
| 1430 | |
| 1431 | void TestCodeCompletion::testArgumentHintCompletion() |
| 1432 | { |
| 1433 | QFETCH(QString, code); |
| 1434 | QFETCH(CompletionItems, expectedItems); |
| 1435 | QFETCH(HintItemList, hints); |
| 1436 | |
| 1437 | executeCompletionTest(code, expectedItems, NoMacroOrBuiltin, [&](const ClangCodeCompletionItemTester& tester) { |
| 1438 | DUChainReadLocker lock; |
| 1439 | HintItemList actualHints; |
| 1440 | for (const auto& item : tester.items) { |
| 1441 | if (item->argumentHintDepth() == 1) { |
| 1442 | actualHints << HintItem{ |
| 1443 | tester.itemData(item).toString() + tester.itemData(item, KTextEditor:: CodeCompletionModel::Arguments).toString(), |
| 1444 | item->declaration() |
| 1445 | }; |
| 1446 | } |
| 1447 | } |
| 1448 | std::sort(hints.begin(), hints.end()); |
| 1449 | std::sort(actualHints.begin(), actualHints.end()); |
| 1450 | QEXPECT_FAIL("member function", "clang_getCompletionParent returns nothing, thus decl lookup fails", Continue); |
| 1451 | QEXPECT_FAIL("namespaced function", "clang_getCompletionParent returns nothing, thus decl lookup fails", Continue); |
| 1452 | QEXPECT_FAIL("namespaced constructor", "clang_getCompletionParent returns nothing, thus decl lookup fails", Continue); |
| 1453 | QCOMPARE(actualHints, hints); |
| 1454 | }); |
| 1455 | } |
| 1456 | |
| 1457 | void TestCodeCompletion::testArgumentHintCompletion_data() |
| 1458 | { |
nothing calls this directly
no test coverage detected