diff options
Diffstat (limited to 'src/plugins/cpptools/cppcompletion_test.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcompletion_test.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcompletion_test.cpp b/src/plugins/cpptools/cppcompletion_test.cpp index bf16f2e219..717687b6a6 100644 --- a/src/plugins/cpptools/cppcompletion_test.cpp +++ b/src/plugins/cpptools/cppcompletion_test.cpp @@ -2384,6 +2384,17 @@ void CppToolsPlugin::test_completion_data() "}\n" ) << _("s.") << (QStringList() << QLatin1String("S")); + + QTest::newRow("auto_declaration_in_if_condition") << _( + "struct Foo { int bar; };\n" + "void fun() {\n" + " if (auto s = new Foo) {\n" + " @\n" + " }\n" + "}\n" + ) << _("s->") << (QStringList() + << QLatin1String("Foo") + << QLatin1String("bar")); } void CppToolsPlugin::test_completion_member_access_operator() |