I ran through three refactorings (Extract Function, Extract Method, Rename) in the latest version of Visual AssistX using my refactoring test suite and posted the results on the Whole Tomato support forums.
Summary
Refactoring | % Passing | Passed | Failed |
---|---|---|---|
Extract Function | 0% | 0 | 18 |
Extract Method | 45% | 9 | 11 |
Rename | 63.55% | 61 | 35 |
Feel free to comment here on the test suite itself. I’ll probably move this to github to encourage more pull requests for improvements to the tests. I haven’t updated it for C++11 language features. Feel free to post in the Whole Tomato support forum thread for comments on Visual AssistX itself.
Details
The refactoring test suite that I put together is a set of source code annotated with comments instruction you on where to apply different refactorings from whatever refactoring tool you are testing. If the refactoring tool produced a change that was syntactically correct and preserved the meaning of the code, then the refactoring test is deemed to have passed. Otherwise, the test is deemed to have failed.
23-June-2014 at 8:27 am
How do the opensource IDE’s handle the refactor test suite? I am thinking at Qt Creator, KDevelop, CodeLite, Eclipse CDT, or the upcoming Jetbrains C++ IDE.
I think having a CMake script instead of the Visual Studio project file would make it easier to test on other IDEs.
LikeLike
23-June-2014 at 10:00 am
Having recently learned CMake, I totally agree that I should have a CMake project file for it. At the time I first created this, it was expressly to evaluate add-ons for Visual Studio. I am doing some enhancements on this suite and moving the code to github to encourage more participation and pull requests. You can see that effort here: https://github.com/LegalizeAdulthood/refactor-test-suite with more to come soon.
I recently heard about the JetBrains C++ IDE, which apparently is an offshoot of their AppCode product. They only have a MacOS download for AppCode, so I couldn’t try it out. From what I can tell it will work with any CMake based project, so that’s another point in favor of CMake. Qt Creator does have some interesting refactorings (and a bunch of things that are really code generators and not refactorings). I would encourage someone to run this suite against that tool and report the results as a pull request to github.
LikeLike