<p>I think these helpers are not generated in test-mode, because they have compile-dependencies which are not part of the test_cppcodecompletion, and would require some refactoring to be integrated.</p>
<p>We should change this though, as we require tests for this too. We need a test-architecture which includes ktexteditor documents to make this perfect, because right now, we have generally no way to test the execution of items.</p>

<p>Greetings, David</p>
<div class="gmail_quote">Am 21.03.2011 23:59 schrieb "Dmitry Risenberg" <<a href="mailto:dmitry.risenberg@gmail.com">dmitry.risenberg@gmail.com</a>>:<br type="attribution">> I want to write a unit test for this:<br>
> <a href="https://bugs.kde.org/show_bug.cgi?id=255038">https://bugs.kde.org/show_bug.cgi?id=255038</a>.<br>> I tried the following code, following other unit tests in test_cppcodecompletion<br>> <br>>     QByteArray test = "class A {}; class B : public A { B(int i); };";<br>
>     TopDUContext* context = parse( test, DumpNone /*DumpDUChain | DumpAST */);<br>>     DUChainWriteLocker lock(DUChain::lock());<br>>     CompletionItemTester tester(context, "");<br>> <br>> "" - stands for pressing a Ctrl+Space.<br>
> <br>> However, tester.items contains only two items - "A" and "B" - and no<br>> item "implement constructor", while completion in a file with the same<br>> contents has an entry for implementing constructor. What am I doing<br>
> wrong?<br>> <br>> -- <br>> Dmitry Risenberg<br>> <br>> -- <br>> KDevelop-devel mailing list<br>> <a href="mailto:KDevelop-devel@kdevelop.org">KDevelop-devel@kdevelop.org</a><br>> <a href="https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel">https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel</a><br>
</div>