Commit 03923fc5 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

CppEditor: Add a failing test for move outside class with template

Task-number: QTCREATORBUG-16649
Change-Id: I29c42c23f4dc44b0401fb07c0dc6d0008dcaf096
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent 44f1d4ff
......@@ -167,6 +167,7 @@ private slots:
void test_quickfix_MoveFuncDefOutside_respectWsInOperatorNames1();
void test_quickfix_MoveFuncDefOutside_respectWsInOperatorNames2();
void test_quickfix_MoveFuncDefOutside_macroUses();
void test_quickfix_MoveFuncDefOutside_template();
void test_quickfix_MoveAllFuncDefOutside_MemberFuncToCpp();
void test_quickfix_MoveAllFuncDefOutside_MemberFuncOutside();
......
......@@ -4018,6 +4018,23 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_macroUses()
ProjectPartHeaderPaths(), 0, "QTCREATORBUG-12314");
}
void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_template()
{
QByteArray original =
"template<class T>\n"
"class Foo { void fu@nc() {} };\n";
QByteArray expected =
"template<class T>\n"
"class Foo { void fu@nc(); };\n"
"\n"
"template<class T>\n"
"void Foo<T>::func() {}\n";
;
MoveFuncDefOutside factory;
QuickFixOperationTest(singleDocument(original, expected), &factory, {}, 0, "QTCREATORBUG-16649");
}
/// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCpp()
void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFunc()
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment