forked from qt-creator/qt-creator
CppTools: Add a failing test for explicit template base typedef
Task-number: QTCREATORBUG-14218 Change-Id: I1cccc522f0d484e966f97bea86236e83caec754a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
55ed8b861b
commit
0501efdcd9
@@ -314,6 +314,7 @@ void CppToolsPlugin::test_completion()
|
||||
actualCompletions.sort();
|
||||
expectedCompletions.sort();
|
||||
|
||||
QEXPECT_FAIL("template_as_base: explicit typedef from base", "QTCREATORBUG-14218", Abort);
|
||||
QEXPECT_FAIL("enum_in_function_in_struct_in_function", "QTCREATORBUG-13757", Abort);
|
||||
QEXPECT_FAIL("enum_in_function_in_struct_in_function_cxx11", "QTCREATORBUG-13757", Abort);
|
||||
QEXPECT_FAIL("enum_in_function_in_struct_in_function_anon", "QTCREATORBUG-13757", Abort);
|
||||
@@ -710,6 +711,34 @@ void CppToolsPlugin::test_completion_data()
|
||||
<< QLatin1String("Other")
|
||||
<< QLatin1String("otherMember"));
|
||||
|
||||
QTest::newRow("template_as_base: typedef not available in derived") << _(
|
||||
"class Data { int dataMember; };\n"
|
||||
"template <class T> struct Base { typedef T F; };\n"
|
||||
"template <class T> struct Derived : Base<T> { F f; };\n"
|
||||
"\n"
|
||||
"void func() {\n"
|
||||
" Derived<Data> d;\n"
|
||||
" @\n"
|
||||
"}\n"
|
||||
) << _("d.f.") << QStringList();
|
||||
|
||||
QTest::newRow("template_as_base: explicit typedef from base") << _(
|
||||
"class Data { int dataMember; };\n"
|
||||
"template <class T> struct Base { typedef T F; };\n"
|
||||
"template <class T> struct Derived : Base<T>\n"
|
||||
"{\n"
|
||||
" typedef typename Base<T>::F F;\n"
|
||||
" F f;\n"
|
||||
"};\n"
|
||||
"\n"
|
||||
"void func() {\n"
|
||||
" Derived<Data> d;\n"
|
||||
" @\n"
|
||||
"}\n"
|
||||
) << _("d.f.") << (QStringList()
|
||||
<< QLatin1String("Data")
|
||||
<< QLatin1String("dataMember"));
|
||||
|
||||
QTest::newRow("use_global_identifier_as_base_class: derived as global and base as global") << _(
|
||||
"struct Global\n"
|
||||
"{\n"
|
||||
|
||||
Reference in New Issue
Block a user