| 1049 | } |
| 1050 | |
| 1051 | void TestCodeCompletion::testImplementOtherFile() |
| 1052 | { |
| 1053 | TestFile header1(QStringLiteral("void foo();"), QStringLiteral("h")); |
| 1054 | QVERIFY(header1.parseAndWait()); |
| 1055 | TestFile header2(QStringLiteral("void bar();"), QStringLiteral("h")); |
| 1056 | QVERIFY(header2.parseAndWait()); |
| 1057 | TestFile impl(QString("#include \"%1\"\n" |
| 1058 | "#include \"%2\"\n" |
| 1059 | "void asdf();\n\n") |
| 1060 | .arg(header1.url().str(), header2.url().str()), |
| 1061 | QStringLiteral("cpp"), &header1); |
| 1062 | |
| 1063 | CompletionItems expectedItems{{3,1}, {"asdf()", "foo()"}}; |
| 1064 | QVERIFY(impl.parseAndWait(TopDUContext::AllDeclarationsContextsUsesAndAST)); |
| 1065 | executeCompletionTest(impl.topContext(), expectedItems); |
| 1066 | } |
| 1067 | |
| 1068 | void TestCodeCompletion::testImplementAfterEdit() |
| 1069 | { |
nothing calls this directly
no test coverage detected