diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2015-03-13 11:46:08 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2015-03-13 11:30:07 +0000 |
commit | a320daff865cefa6a880c80f3bae897dd7557345 (patch) | |
tree | 46fb3d77e12538e735d71651e682f06c5f554bc7 /src/plugins/cpptools/cppcompletion_test.cpp | |
parent | c9b71a268b9f60b31b03e84de76d51ef668c0dfb (diff) | |
download | qt-creator-a320daff865cefa6a880c80f3bae897dd7557345.tar.gz |
CppTools: Add a failing test for partial template specialization
Task-number: QTCREATORBUG-14036
Change-Id: I7545bfa40ec3e1399d57bf5ab2486318aa1fcb9f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/cppcompletion_test.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcompletion_test.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index f2eebca867..405867148d 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -319,6 +319,7 @@ void CppToolsPlugin::test_completion() QEXPECT_FAIL("enum_in_function_in_struct_in_function_anon", "QTCREATORBUG-13757", Abort); QEXPECT_FAIL("enum_in_class_accessed_in_member_func_cxx11", "QTCREATORBUG-13757", Abort); QEXPECT_FAIL("enum_in_class_accessed_in_member_func_inline_cxx11", "QTCREATORBUG-13757", Abort); + QEXPECT_FAIL("pointer_partial_specialization", "QTCREATORBUG-14036", Abort); QCOMPARE(actualCompletions, expectedCompletions); } @@ -2654,6 +2655,35 @@ void CppToolsPlugin::test_completion_data() << QLatin1String("operator ->") << QLatin1String("t") << QLatin1String("iterator")); + + QTest::newRow("pointer_partial_specialization") << _( + "template<typename T>\n" + "struct Traits { typedef typename T::pointer pointer; };\n" + "\n" + "template<typename _Tp>\n" + "struct Traits<_Tp*> { typedef _Tp *pointer; };\n" + "\n" + "template<typename T>\n" + "class Temp\n" + "{\n" + "protected:\n" + " typedef Traits<T> TraitsT;\n" + "\n" + "public:\n" + " typedef typename TraitsT::pointer pointer;\n" + " pointer p;\n" + "};\n" + "\n" + "struct Foo { int bar; };\n" + "\n" + "void func()\n" + "{\n" + " Temp<Foo *> t;\n" + " @\n" + "}\n" + ) << _("t.p->") << (QStringList() + << QLatin1String("Foo") + << QLatin1String("bar")); } void CppToolsPlugin::test_completion_member_access_operator() |