Commit 334ccfec authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

CppEditor: Add tests for FollowSymbol on function calls



Change-Id: I5eeab0415c2f73f698188e91ec553b74c8779eae
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 92b4b640
......@@ -931,6 +931,45 @@ void CppEditorPlugin::test_FollowSymbolUnderCursor_data()
"};\n"
);
QTest::newRow("matchFunctionSignature_FollowCall_1") << _(
"class Bar {};\n"
"void $foo(int) {}\n"
"void foo(const char *) {}\n"
"void foo(const Bar &) {}\n"
"void foo(char) {}\n"
"\n"
"void t()\n"
"{\n"
" @foo(5);\n"
"}\n"
);
QTest::newRow("matchFunctionSignature_FollowCall_2") << _(
"class Bar {};\n"
"void foo(int) {}\n"
"void $foo(const char *) {}\n"
"void foo(const Bar &) {}\n"
"void foo(char) {}\n"
"\n"
"void t()\n"
"{\n"
" @foo(\"hoo\");\n"
"}\n"
);
QTest::newRow("matchFunctionSignature_FollowCall_3") << _(
"class Bar {};\n"
"void foo(int) {}\n"
"void foo(const char *) {}\n"
"void foo(const Bar &) {}\n"
"void $foo(char) {}\n"
"\n"
"void t()\n"
"{\n"
" @foo('a');\n"
"}\n"
);
QTest::newRow("infiniteLoopLocalTypedef_QTCREATORBUG-11999") << _(
"template<class MyTree>\n"
"class TreeConstIterator\n"
......
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