Commit 4c7e0008 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

CppEditor: Reorder virtual methods tests



For easier diff

Change-Id: I34effdc85c4bef51b80f5763e1522162c2b64b4e
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 9804710f
......@@ -3979,6 +3979,34 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_outside()
data.run(&factory);
}
/// Check: No trigger: all implemented
void CppEditorPlugin::test_quickfix_InsertVirtualMethods_notrigger_allImplemented()
{
const QByteArray original =
"class BaseA {\n"
"public:\n"
" virtual int virtualFuncA();\n"
"};\n\n"
"class Derived : public Bas@eA {\n"
"public:\n"
" virtual int virtualFuncA();\n"
"};";
const QByteArray expected =
"class BaseA {\n"
"public:\n"
" virtual int virtualFuncA();\n"
"};\n\n"
"class Derived : public Bas@eA {\n"
"public:\n"
" virtual int virtualFuncA();\n"
"};\n";
InsertVirtualMethods factory(new InsertVirtualMethodsDialogTest(
InsertVirtualMethodsDialog::ModeOutsideClass, true));
TestCase data(original, expected);
data.run(&factory);
}
/// Check: Insert in implementation file
void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
{
......@@ -4026,34 +4054,6 @@ void CppEditorPlugin::test_quickfix_InsertVirtualMethods_implementationFile()
data.run(&factory);
}
/// Check: No trigger: all implemented
void CppEditorPlugin::test_quickfix_InsertVirtualMethods_notrigger_allImplemented()
{
const QByteArray original =
"class BaseA {\n"
"public:\n"
" virtual int virtualFuncA();\n"
"};\n\n"
"class Derived : public Bas@eA {\n"
"public:\n"
" virtual int virtualFuncA();\n"
"};";
const QByteArray expected =
"class BaseA {\n"
"public:\n"
" virtual int virtualFuncA();\n"
"};\n\n"
"class Derived : public Bas@eA {\n"
"public:\n"
" virtual int virtualFuncA();\n"
"};\n";
InsertVirtualMethods factory(new InsertVirtualMethodsDialogTest(
InsertVirtualMethodsDialog::ModeOutsideClass, true));
TestCase data(original, expected);
data.run(&factory);
}
/// Check: Qualified names.
void CppEditorPlugin::test_quickfix_InsertVirtualMethods_BaseClassInNamespace()
{
......
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