forked from qt-creator/qt-creator
CppEditor: Do not show InsertDefFromDecl if triggered on a statement
Change-Id: Ib0b110ac80d9519461a6ba6cf5b7c77925ed2ea5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
e1db88e113
commit
20a23ec72b
@@ -908,6 +908,24 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_notTriggeringWhenDefinitio
|
||||
data.run(&factory, 1);
|
||||
}
|
||||
|
||||
/// Check not triggering when it is a statement
|
||||
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_notTriggeringStatement()
|
||||
{
|
||||
const QByteArray original =
|
||||
"class Foo {\n"
|
||||
"public:\n"
|
||||
" Foo() {}\n"
|
||||
"};\n"
|
||||
"void freeFunc() {\n"
|
||||
" Foo @f();"
|
||||
"}\n";
|
||||
const QByteArray expected = original + "\n";
|
||||
|
||||
InsertDefFromDecl factory;
|
||||
TestCase data(original, expected);
|
||||
data.run(&factory);
|
||||
}
|
||||
|
||||
// Function for one of InsertDeclDef section cases
|
||||
void insertToSectionDeclFromDef(const QByteArray §ion, int sectionIndex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user