forked from qt-creator/qt-creator
CppEditor: Add a failing test for move outside class with template
Task-number: QTCREATORBUG-16649 Change-Id: I29c42c23f4dc44b0401fb07c0dc6d0008dcaf096 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
44f1d4ff91
commit
03923fc5a2
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user