Commit 7ba22101 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

CppTools: Add failing tests for recursive instantiation



Task-number: QTCREATORBUG-14237
Change-Id: I59ae931994ef6577010a4544219ba3b0cd85c677
Reviewed-by: default avatarPrzemyslaw Gorszkowski <pgorszkowski@gmail.com>
parent c2a2c4c8
......@@ -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()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment