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.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp
index 3bf0904c65..c743e0ed7d 100644
--- a/src/plugins/cpptools/cppcompletion_test.cpp
+++ b/src/plugins/cpptools/cppcompletion_test.cpp
@@ -1551,6 +1551,29 @@ void CppToolsPlugin::test_completion_data()
<< QLatin1String("C")
<< QLatin1String("m"));
+ QTest::newRow("type_and_using_declaration: type in nested namespace and using in global") << _(
+ "namespace Ns {\n"
+ "namespace Nested {\n"
+ "struct Foo\n"
+ "{\n"
+ " void func();\n"
+ " int m_bar;\n"
+ "};\n"
+ "}\n"
+ "}\n"
+ "\n"
+ "using namespace Ns::Nested;\n"
+ "\n"
+ "namespace Ns\n"
+ "{\n"
+ "void Foo::func()\n"
+ "{\n"
+ " @\n"
+ "}\n"
+ "}\n"
+ ) << _("m_") << (QStringList()
+ << QLatin1String("m_bar"));
+
QTest::newRow("instantiate_template_with_anonymous_class") << _(
"template <typename T>\n"
"struct S\n"