diff options
Diffstat (limited to 'src/plugins/cpptools/cppcompletion_test.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcompletion_test.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index e6cc006825..78757e6b15 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -324,6 +324,8 @@ void CppToolsPlugin::test_completion() QEXPECT_FAIL("pointer_indirect_specialization_typedef", "QTCREATORBUG-14141", Abort); QEXPECT_FAIL("pointer_indirect_specialization_double_indirection", "QTCREATORBUG-14141", Abort); QEXPECT_FAIL("pointer_indirect_specialization_double_indirection_with_base", "QTCREATORBUG-14141", Abort); + QEXPECT_FAIL("recursive_instantiation_of_template_type", "QTCREATORBUG-14237", Abort); + QEXPECT_FAIL("recursive_instantiation_of_template_type_2", "QTCREATORBUG-14141", Abort); QCOMPARE(actualCompletions, expectedCompletions); } @@ -2815,6 +2817,36 @@ void CppToolsPlugin::test_completion_data() ) << _("t.p->") << (QStringList() << QLatin1String("Foo") << QLatin1String("bar")); + + QTest::newRow("recursive_instantiation_of_template_type") << _( + "template<typename _Tp>\n" + "struct Temp { typedef _Tp value_type; };\n" + "\n" + "struct Foo { int bar; };\n" + "\n" + "void func()\n" + "{\n" + " Temp<Temp<Foo> >::value_type::value_type *p;\n" + " @\n" + "}\n" + ) << _("p->") << (QStringList() + << QLatin1String("Foo") + << QLatin1String("bar")); + + QTest::newRow("recursive_instantiation_of_template_type_2") << _( + "template<typename _Tp>\n" + "struct Temp { typedef _Tp value_type; };\n" + "\n" + "struct Foo { int bar; };\n" + "\n" + "void func()\n" + "{\n" + " Temp<Temp<Foo>::value_type>::value_type *p;\n" + " @\n" + "}\n" + ) << _("p->") << (QStringList() + << QLatin1String("Foo") + << QLatin1String("bar")); } void CppToolsPlugin::test_completion_member_access_operator() |