forked from qt-creator/qt-creator
C++: Pass only reasonable ASTs to pointer declaration formatter
Change-Id: Ide829a8084d3fef79f252dc7724bd90ce8ebba04 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include <cppeditor/cppplugin.h>
|
||||
#include <cppeditor/cppquickfixassistant.h>
|
||||
#include <cppeditor/cppquickfix.h>
|
||||
#include <cppeditor/cppquickfixes.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <texteditor/basetextdocument.h>
|
||||
#include <texteditor/codeassist/basicproposalitemlistmodel.h>
|
||||
@@ -543,3 +544,14 @@ void CppPlugin::test_quickfix_GenerateGetterSetter_notTriggeringWhenGetterOrSett
|
||||
GenerateGetterSetter factory(/*testMode=*/ true);
|
||||
data.run(&factory, expected, /*changesExpected=*/ false);
|
||||
}
|
||||
|
||||
/// Check: Just a basic test since the main functionality is tested in
|
||||
/// cpppointerdeclarationformatter_test.cpp
|
||||
void CppPlugin::test_quickfix_ReformatPointerDeclaration()
|
||||
{
|
||||
TestCase data("char@*s;");
|
||||
QByteArray expected = "char *s;\n";
|
||||
|
||||
ReformatPointerDeclaration factory;
|
||||
data.run(&factory, expected);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user