diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2014-11-04 11:50:03 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2014-11-04 13:05:44 +0100 |
commit | 334ccfec3e169f37b66b1f3d0228b13e4d242b32 (patch) | |
tree | 4dd4238d7969c3b186df1b348ae2e15fed43da13 /src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | |
parent | 92b4b64048fe47f400daf597cd405ff1cd47f772 (diff) |
CppEditor: Add tests for FollowSymbol on function calls
Change-Id: I5eeab0415c2f73f698188e91ec553b74c8779eae
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp')
-rw-r--r-- | src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index 27d7fea83f..811552971f 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -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" |