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.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp
index cc98254c76..82a58d4760 100644
--- a/src/plugins/cpptools/cppcompletion_test.cpp
+++ b/src/plugins/cpptools/cppcompletion_test.cpp
@@ -2623,6 +2623,20 @@ void CppToolsPlugin::test_completion_data()
) << _("s.") << (QStringList()
<< QLatin1String("S"));
+ QTest::newRow("partial_specialization") << _(
+ "struct b {};\n"
+ "template<class X, class Y> struct s { float f; };\n"
+ "template<class X> struct s<X, b> { int i; };\n"
+ "\n"
+ "void f()\n"
+ "{\n"
+ " s<int, b> var;\n"
+ " @\n"
+ "}\n"
+ ) << _("var.") << (QStringList()
+ << QLatin1String("i")
+ << QLatin1String("s"));
+
QTest::newRow("auto_declaration_in_if_condition") << _(
"struct Foo { int bar; };\n"
"void fun() {\n"