Commit b865c6e5 authored by Joerg Bornemann's avatar Joerg Bornemann
Browse files

CppEditor: more autotests for follow under cursor



Add autotests for follow under cursor for constructors and
destructors.

Task-number: QTCREATORBUG-7485
Change-Id: I43cc12f54b93a582203cd52c1fd61fedf9198e74
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent c9f5a14b
......@@ -119,6 +119,8 @@ private slots:
void test_FollowSymbolUnderCursor_baseClassFunctionIntroducedByUsingDeclaration();
void test_FollowSymbolUnderCursor_funWithSameNameAsBaseClassFunIntroducedByUsingDeclaration();
void test_FollowSymbolUnderCursor_funLocalVarHidesOuterClass();
void test_FollowSymbolUnderCursor_classConstructor();
void test_FollowSymbolUnderCursor_classDestructor();
void test_FollowSymbolUnderCursor_using_QTCREATORBUG7903_globalNamespace();
void test_FollowSymbolUnderCursor_using_QTCREATORBUG7903_namespace();
void test_FollowSymbolUnderCursor_using_QTCREATORBUG7903_insideFunction();
......
......@@ -862,6 +862,42 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_funLocalVarHidesOuterClass()
test.run();
}
void CppEditorPlugin::test_FollowSymbolUnderCursor_classConstructor()
{
const QByteArray source =
"class Foo {\n"
" F@oo();"
" ~Foo();"
"};\n\n"
"Foo::$Foo()\n"
"{\n"
"}\n\n"
"Foo::~Foo()\n"
"{\n"
"}\n";
TestCase test(TestCase::FollowSymbolUnderCursor, source);
test.run();
}
void CppEditorPlugin::test_FollowSymbolUnderCursor_classDestructor()
{
const QByteArray source =
"class Foo {\n"
" Foo();"
" ~@Foo();"
"};\n\n"
"Foo::Foo()\n"
"{\n"
"}\n\n"
"Foo::~$Foo()\n"
"{\n"
"}\n";
TestCase test(TestCase::FollowSymbolUnderCursor, source);
test.run();
}
void CppEditorPlugin::test_FollowSymbolUnderCursor_using_QTCREATORBUG7903_globalNamespace()
{
const QByteArray source =
......
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