Review Request 124638: More tests for Extract Variable refactoring (extended capabilities from UTF)

Maciej Poleski d82ks8djf82msd83hf8sc02lqb5gh5 at gmail.com
Thu Aug 6 22:45:33 UTC 2015



> On Sie 7, 2015, 12:24 rano, Milian Wolff wrote:
> > the tests are fine, but I wonder whether you could also test the higher-level integration. Conceptually, the user would select some range and then run one of a set of available refactoring actions. So could we get a test that takes code + range as input and then checks what refactoring actions are available and then runs them? Bypassing GUI should still be possible somehow, e.g. by casting the refactoring action to some concrete type and then calling a "doRefactor(variableName)" or similar on it.

Design suffers from coupling refactorings with Refactoring Manager. Basically task of deciding what can be done "here" is handled by Refactoring Manager. After that (during to be precise) we have an AST node. This AST node is used to initialize concrete (possible) refactoring actions.
As a result classes handling particular refactorings take as input (some form of) AST node. That's what we test here.
On Refactoring Manager side this decision is made during run of fine-grained visitor on specially prepared `RefactoringTool`... Visitor is not part of API.
I will look what can be done about that


- Maciej


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


On Sie 6, 2015, 1:42 rano, Maciej Poleski wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124638/
> -----------------------------------------------------------
> 
> (Updated Sie 6, 2015, 1:42 rano)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> More tests for Extract Variable refactoring (this time real tests)
> 
> Comes separately because UTF was extended during work on Extract Function which is after Extract Variable
> 
> 
> Diffs
> -----
> 
>   refactoring/extractvariablerefactoring.h PRE-CREATION 
>   refactoring/extractvariablerefactoring.cpp PRE-CREATION 
>   tests/test_extractvariable.h PRE-CREATION 
>   tests/test_extractvariable.cpp PRE-CREATION 
> 
> Diff: https://git.reviewboard.kde.org/r/124638/diff/
> 
> 
> Testing
> -------
> 
> 4x PASS
> 
> 
> Thanks,
> 
> Maciej Poleski
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150806/408a0f66/attachment.html>


More information about the KDevelop-devel mailing list