Commit d2b5136a authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

CppEditor: s/testFile/testDocument/



Change-Id: I5e7cd4998fe1ab5aa649f27d06710582f5c77453
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent bc3b1250
......@@ -224,19 +224,19 @@ QuickFixOperationTest::QuickFixOperationTest(const QList<QuickFixTestDocument::P
operation->perform();
// Compare all files
foreach (const QuickFixTestDocument::Ptr testFile, m_testDocuments) {
foreach (const QuickFixTestDocument::Ptr testDocument, m_testDocuments) {
// Check
QString result = testFile->m_editorWidget->document()->toPlainText();
QString result = testDocument->m_editorWidget->document()->toPlainText();
removeTrailingWhitespace(result);
if (!expectedFailMessage.isEmpty())
QEXPECT_FAIL("", expectedFailMessage.data(), Continue);
QCOMPARE(result, testFile->m_expectedSource);
QCOMPARE(result, testDocument->m_expectedSource);
// Undo the change
for (int i = 0; i < 100; ++i)
testFile->m_editorWidget->undo();
result = testFile->m_editorWidget->document()->toPlainText();
QCOMPARE(result, testFile->m_source);
testDocument->m_editorWidget->undo();
result = testDocument->m_editorWidget->document()->toPlainText();
QCOMPARE(result, testDocument->m_source);
}
}
......@@ -1610,7 +1610,7 @@ void CppEditorPlugin::test_quickfix()
/// generated definitions should fit in the namespace.
void CppEditorPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAndNamespaceToCpp()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -1633,7 +1633,7 @@ void CppEditorPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAn
" void setIt(int value);\n"
"};\n"
"}\n";
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original =
......@@ -1653,16 +1653,16 @@ void CppEditorPlugin::test_quickfix_GenerateGetterSetter_basicGetterWithPrefixAn
" it = value;\n"
"}\n\n"
"}\n";
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
GenerateGetterSetter factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check if definition is inserted right after class for insert definition outside
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_afterClass()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -1686,7 +1686,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_afterClass()
"{\n\n}\n"
"\n"
"class Bar {};\n";
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original =
......@@ -1696,17 +1696,17 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_afterClass()
"{\n\n"
"}\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory, ProjectPart::HeaderPaths(), 1);
QuickFixOperationTest(testDocuments, &factory, ProjectPart::HeaderPaths(), 1);
}
/// Check from header file: If there is a source file, insert the definition in the source file.
/// Case: Source file is empty.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic1()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -1718,7 +1718,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic1()
" Foo()@;\n"
"};\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original.resize(0);
......@@ -1728,17 +1728,17 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic1()
"{\n\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check from header file: If there is a source file, insert the definition in the source file.
/// Case: Source file is not empty.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic2()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -1746,7 +1746,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic2()
// Header File
original = "void f()@;\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original =
......@@ -1765,22 +1765,22 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic2()
"\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check from source file: Insert in source file, not header file.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic3()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
// Empty Header File
testFiles << QuickFixTestDocument::create("file.h", "", "");
testDocuments << QuickFixTestDocument::create("file.h", "", "");
// Source File
original =
......@@ -1795,17 +1795,17 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_basic3()
"{\n\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check from header file: If the class is in a namespace, the added function definition
/// name must be qualified accordingly.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace1()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -1819,7 +1819,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace1()
"};\n"
"}\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original.resize(0);
......@@ -1829,17 +1829,17 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace1()
"{\n\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check from header file: If the class is in namespace N and the source file has a
/// "using namespace N" line, the function definition name must be qualified accordingly.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace2()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -1853,7 +1853,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace2()
"};\n"
"}\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original =
......@@ -1867,10 +1867,10 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace2()
"{\n\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check definition insert inside class
......@@ -1910,7 +1910,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_notTriggeringWhenDefinitio
/// Find right implementation file.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_findRightImplementationFile()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -1925,7 +1925,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_findRightImplementationFil
"};\n"
"}\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File #1
original =
......@@ -1935,7 +1935,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_findRightImplementationFil
"{\n\n"
"}\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
// Source File #2
......@@ -1950,17 +1950,17 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_findRightImplementationFil
"void Foo::b()\n"
"{\n\n"
"}\n";
testFiles << QuickFixTestDocument::create("file2.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file2.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Ignore generated functions declarations when looking at the surrounding
/// functions declarations in order to find the right implementation file.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_ignoreSurroundingGeneratedDeclarations()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -1976,7 +1976,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_ignoreSurroundingGenerated
"};\n"
"}\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File #1
original =
......@@ -1995,7 +1995,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_ignoreSurroundingGenerated
"void Foo::b()\n"
"{\n\n"
"}\n";
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
// Source File #2
original =
......@@ -2005,10 +2005,10 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_ignoreSurroundingGenerated
"{\n\n"
"}\n";
expected = original;
testFiles << QuickFixTestDocument::create("file2.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file2.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check if whitespace is respected for operator functions
......@@ -2063,7 +2063,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_respectWsInOperatorNames2(
/// Case: Macro preceded by preproceesor directives and declaration.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_macroUsesAtEndOfFile1()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -2071,7 +2071,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_macroUsesAtEndOfFile1()
// Header File
original = "void f()@;\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original =
......@@ -2095,17 +2095,17 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_macroUsesAtEndOfFile1()
"\n"
"MACRO(int)\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check if a function like macro use is not separated by the function to insert
/// Case: Marco preceded only by preprocessor directives.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_macroUsesAtEndOfFile2()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -2113,7 +2113,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_macroUsesAtEndOfFile2()
// Header File
original = "void f()@;\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original =
......@@ -2135,16 +2135,16 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_macroUsesAtEndOfFile2()
"\n"
"MACRO(int)\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check if insertion happens before syntactically erroneous statements at end of file.
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_erroneousStatementAtEndOfFile()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -2152,7 +2152,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_erroneousStatementAtEndOfF
// Header File
original = "void f()@;\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original =
......@@ -2172,16 +2172,16 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_erroneousStatementAtEndOfF
"\n"
"MissingSemicolon(int)\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Check: Respect rvalue references
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_rvalueReference()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -2189,7 +2189,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_rvalueReference()
// Header File
original = "void f(Foo &&)@;\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original = "";
......@@ -2200,16 +2200,16 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_rvalueReference()
"\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
/// Find right implementation file. (QTCREATORBUG-10728)
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_findImplementationFile()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -2224,7 +2224,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_findImplementationFile()
"void Foo::bar()\n"
"{}\n";
expected = original;
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original =
......@@ -2239,15 +2239,15 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_findImplementationFile()
"\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
void CppEditorPlugin::test_quickfix_InsertDefFromDecl_unicodeIdentifier()
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -2278,7 +2278,7 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_unicodeIdentifier()
"{\n"
"\n"
"}\n";
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
#undef UNICODE_U00FC
#undef UNICODE_U4E8C
......@@ -2286,13 +2286,13 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_unicodeIdentifier()
#undef TEST_UNICODE_IDENTIFIER
InsertDefFromDecl factory;
QuickFixOperationTest(testFiles, &factory);
QuickFixOperationTest(testDocuments, &factory);
}
// Function for one of InsertDeclDef section cases
void insertToSectionDeclFromDef(const QByteArray &section, int sectionIndex)
{
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -2308,7 +2308,7 @@ void insertToSectionDeclFromDef(const QByteArray &section, int sectionIndex)
+ section + ":\n" +
" Foo();\n"
"@};\n";
testFiles << QuickFixTestDocument::create("file.h", original, expected);
testDocuments << QuickFixTestDocument::create("file.h", original, expected);
// Source File
original =
......@@ -2319,10 +2319,10 @@ void insertToSectionDeclFromDef(const QByteArray &section, int sectionIndex)
"}\n"
;
expected = original;
testFiles << QuickFixTestDocument::create("file.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("file.cpp", original, expected);
InsertDeclFromDef factory;
QuickFixOperationTest(testFiles, &factory, ProjectPart::HeaderPaths(), sectionIndex);
QuickFixOperationTest(testDocuments, &factory, ProjectPart::HeaderPaths(), sectionIndex);
}
/// Check from source file: Insert in header file.
......@@ -2346,7 +2346,7 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_data()
const int firstRefactoringOperation = 0;
const int secondRefactoringOperation = 1;
QList<QuickFixTestDocument::Ptr> testFiles;
QList<QuickFixTestDocument::Ptr> testDocuments;
QByteArray original;
QByteArray expected;
......@@ -2355,7 +2355,7 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_data()
// Header File
original = "class Foo {};\n";
expected = original;
testFiles << QuickFixTestDocument::create("afile.h", original, expected);
testDocuments << QuickFixTestDocument::create("afile.h", original, expected);
// Source File
original =
......@@ -2375,18 +2375,18 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_data()
" Foo foo;\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("afile.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("afile.cpp", original, expected);
QTest::newRow("onSimpleName")
<< TestIncludePaths::globalIncludePath()
<< testFiles << firstRefactoringOperation << "";
testFiles.clear();
<< testDocuments << firstRefactoringOperation << "";
testDocuments.clear();
// -------------------------------------------------------------------------------------------
// Header File
original = "namespace N { class Foo {}; }\n";
expected = original;
testFiles << QuickFixTestDocument::create("afile.h", original, expected);
testDocuments << QuickFixTestDocument::create("afile.h", original, expected);
// Source File
original =
......@@ -2406,18 +2406,18 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_data()
" N::Foo foo;\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("afile.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("afile.cpp", original, expected);
QTest::newRow("onNameOfQualifiedName")
<< TestIncludePaths::globalIncludePath()
<< testFiles << firstRefactoringOperation << "";
testFiles.clear();
<< testDocuments << firstRefactoringOperation << "";
testDocuments.clear();
// -------------------------------------------------------------------------------------------
// Header File
original = "namespace N { class Foo {}; }\n";
expected = original;
testFiles << QuickFixTestDocument::create("afile.h", original, expected);
testDocuments << QuickFixTestDocument::create("afile.h", original, expected);
// Source File
original =
......@@ -2437,18 +2437,18 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_data()
" N::Foo foo;\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("afile.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("afile.cpp", original, expected);
QTest::newRow("onBaseOfQualifiedName")
<< TestIncludePaths::globalIncludePath()
<< testFiles << firstRefactoringOperation << "";
testFiles.clear();
<< testDocuments << firstRefactoringOperation << "";
testDocuments.clear();
// -------------------------------------------------------------------------------------------
// Header File
original = "namespace N { template <typename T> class Foo {}; }\n";
expected = original;
testFiles << QuickFixTestDocument::create("afile.h", original, expected);
testDocuments << QuickFixTestDocument::create("afile.h", original, expected);
// Source File
original =
......@@ -2468,18 +2468,18 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_data()
" N::Foo<Bar> foo;\n"
"}\n"
;
testFiles << QuickFixTestDocument::create("afile.cpp", original, expected);
testDocuments << QuickFixTestDocument::create("afile.cpp", original, expected);
QTest::newRow("onTemplateName")
<< TestIncludePaths::globalIncludePath()
<< testFiles << firstRefactoringOperation << "";
testFiles.clear();
<< testDocuments << firstRefactoringOperation << "";
testDocuments.clear();
// -------------------------------------------------------------------------------------------
// Header File
original = "namespace N { template <typename T> class Foo {}; }\n";
expected = original;
testFiles << QuickFixTestDocument::create("afile.h", original, expected);
testDocuments << QuickFixTestDocument::create("afile.h", original, expected);
// Source File
original =
......@@ -2499,18 +2499,18 @@ void CppEditorPlugin::test_quickfix_AddIncludeForUndefinedIdentifier_data()
" N::Bar<Foo> foo;\n"
"}\n"
;
testFiles