<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/115638/">https://git.reviewboard.kde.org/r/115638/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Cool!
I would not create a new file for each test. You'll get ~100 lines of duplicated boilerplate code per test otherwise. Can you just move the test function to the existing duchaintest.h/cpp files? Just put them below the existing function, QTestLib will figure out that you have two tests.
Also I don't know java but if you have a few other ideas how a variable can be used (e.g. as the left side of an assignment, as parameter to a function call, in a binary operator, in an if/for/while statement, ...) you should add test cases for that too, since it's extremely easy to do and potentially finds issues.
Examples:
int x = 3;
and then
myfunc(x);
if ( x > 3 )
for ( x = 0; x < 20; x++ ) [3 uses here]
int y = x;
int y = x + 3;
int y = -x;
etc.
Greetings!</pre>
<br />
<p>- Sven Brauch</p>
<br />
<p>On February 11th, 2014, 3:39 a.m. UTC, Matija Skala wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDevelop.</div>
<div>By Matija Skala.</div>
<p style="color: grey;"><i>Updated Feb. 11, 2014, 3:39 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdev-java
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">to check if it correctly finds variable uses</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>duchain/tests/CMakeLists.txt <span style="color: grey">(cd2bd7b)</span></li>
<li>duchain/tests/javausetest.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>duchain/tests/javausetest.cpp <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115638/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>