summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcompletion_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cppcompletion_test.cpp')
-rw-r--r--src/plugins/cpptools/cppcompletion_test.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp
index b7ede1021c..4a5763cc10 100644
--- a/src/plugins/cpptools/cppcompletion_test.cpp
+++ b/src/plugins/cpptools/cppcompletion_test.cpp
@@ -3235,6 +3235,24 @@ void CppToolsPlugin::test_completion_data()
<< QLatin1String("Foo")
<< QLatin1String("bar"));
+ QTest::newRow("typedef for templates in namespace") << _(
+ "namespace N {\n"
+ "\n"
+ "struct Data { int x; };\n"
+ "template <typename T> struct Foo { T member; };\n"
+ "typedef Foo<Data> Bar;\n"
+ "\n"
+ "} // N\n"
+ "\n"
+ "\n"
+ "void f()\n"
+ "{\n"
+ " N::Bar o;\n"
+ " @\n"
+ "}\n"
+ ) << _("o.member.") << (QStringList()
+ << QLatin1String("Data")
+ << QLatin1String("x"));
}
void CppToolsPlugin::test_completion_member_access_operator()