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.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp
index b2978ea3b8..a55968da4a 100644
--- a/src/plugins/cpptools/cppcompletion_test.cpp
+++ b/src/plugins/cpptools/cppcompletion_test.cpp
@@ -2268,6 +2268,19 @@ void CppToolsPlugin::test_completion_data()
"auto func = [](int arg1) { return @; };\n"
) << _("ar") << (QStringList()
<< QLatin1String("arg1"));
+
+ QTest::newRow("default_arguments_for_class_templates_and_base_class_QTCREATORBUG-12605") << _(
+ "struct Foo { int foo; };\n"
+ "template <typename T = Foo>\n"
+ "struct Derived : T {};\n"
+ "void fun() {\n"
+ " Derived<> derived;\n"
+ " @\n"
+ "}\n"
+ ) << _("derived.") << (QStringList()
+ << QLatin1String("Derived")
+ << QLatin1String("foo")
+ << QLatin1String("Foo"));
}
void CppToolsPlugin::test_completion_member_access_operator()