Review Request 115638: a test for use builder

Sven Brauch svenbrauch at googlemail.com
Tue Feb 11 08:57:11 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115638/#review49511
-----------------------------------------------------------


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!

- Sven Brauch


On Feb. 11, 2014, 3:39 a.m., Matija Skala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115638/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2014, 3:39 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-java
> 
> 
> Description
> -------
> 
> to check if it correctly finds variable uses
> 
> 
> Diffs
> -----
> 
>   duchain/tests/CMakeLists.txt cd2bd7b 
>   duchain/tests/javausetest.h PRE-CREATION 
>   duchain/tests/javausetest.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/115638/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Matija Skala
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140211/9df04b38/attachment.html>


More information about the KDevelop-devel mailing list