aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppquickfix_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cppeditor/cppquickfix_test.cpp')
-rw-r--r--src/plugins/cppeditor/cppquickfix_test.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppquickfix_test.cpp b/src/plugins/cppeditor/cppquickfix_test.cpp
index c1b2896846..7882fef70e 100644
--- a/src/plugins/cppeditor/cppquickfix_test.cpp
+++ b/src/plugins/cppeditor/cppquickfix_test.cpp
@@ -236,7 +236,6 @@ QuickFixOperationTest::QuickFixOperationTest(const QList<QuickFixTestDocument::P
QuickFixOperations operations;
factory->match(quickFixInterface, operations);
if (operations.isEmpty()) {
- QEXPECT_FAIL("onBaseOfQualifiedClassName", "QTCREATORBUG-14499", Continue);
QVERIFY(testDocuments.first()->m_expectedSource.isEmpty());
return;
}
@@ -3032,6 +3031,37 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_data()
// -------------------------------------------------------------------------------------------
// Header File
+ original = "template <typename T> class Foo { static void bar() {} };\n";
+ expected = original;
+ testDocuments << QuickFixTestDocument::create("afile.h", original, expected);
+
+ // Source File
+ original =
+ "#include \"header.h\"\n"
+ "\n"
+ "void f()\n"
+ "{\n"
+ " @Foo<int>::bar();\n"
+ "}\n"
+ ;
+ expected =
+ "#include \"afile.h\"\n"
+ "#include \"header.h\"\n"
+ "\n"
+ "void f()\n"
+ "{\n"
+ " Foo<int>::bar();\n"
+ "}\n"
+ ;
+ testDocuments << QuickFixTestDocument::create("afile.cpp", original, expected);
+ QTest::newRow("onBaseOfQualifiedTemplateClassName")
+ << TestIncludePaths::globalIncludePath()
+ << testDocuments << firstRefactoringOperation << "";
+ testDocuments.clear();
+
+ // -------------------------------------------------------------------------------------------
+
+ // Header File
original = "namespace N { template <typename T> class Foo {}; }\n";
expected = original;
testDocuments << QuickFixTestDocument::create("afile.h", original, expected);