forked from qt-creator/qt-creator
CppEditor: ExtractFunction quick fix asks for access specifier
Task-number: QTCREATORBUG-12127 Change-Id: Ifb6ff22282f0f181e49a260e57307ec937f5dfb2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
7879aa5fae
commit
7389f46959
@@ -4454,6 +4454,32 @@ void CppEditorPlugin::test_quickfix_ExtractFunction_data()
|
||||
"{\n"
|
||||
" extracted();\n"
|
||||
"}\n");
|
||||
|
||||
QTest::newRow("class function")
|
||||
<< _("class Foo\n"
|
||||
"{\n"
|
||||
"private:\n"
|
||||
" void bar();\n"
|
||||
"};\n\n"
|
||||
"void Foo::bar()\n"
|
||||
"{\n"
|
||||
" @{start}g();@{end}\n"
|
||||
"}\n")
|
||||
<< _("class Foo\n"
|
||||
"{\n"
|
||||
"public:\n"
|
||||
" void extracted();\n\n"
|
||||
"private:\n"
|
||||
" void bar();\n"
|
||||
"};\n\n"
|
||||
"void Foo::extracted()\n"
|
||||
"{\n"
|
||||
" g();\n"
|
||||
"}\n\n"
|
||||
"void Foo::bar()\n"
|
||||
"{\n"
|
||||
" extracted();\n"
|
||||
"}\n");
|
||||
}
|
||||
|
||||
void CppEditorPlugin::test_quickfix_ExtractFunction()
|
||||
|
||||
Reference in New Issue
Block a user