summaryrefslogtreecommitdiff
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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cppquickfix_test.cpp b/src/plugins/cppeditor/cppquickfix_test.cpp
index 7bfdf5b7ba..5ba0101b39 100644
--- a/src/plugins/cppeditor/cppquickfix_test.cpp
+++ b/src/plugins/cppeditor/cppquickfix_test.cpp
@@ -4707,6 +4707,9 @@ void insertToSectionDeclFromDef(const QByteArray &section, int sectionIndex)
QByteArray original;
QByteArray expected;
+ QByteArray sectionString = section + ":\n";
+ if (sectionIndex == 4)
+ sectionString.clear();
// Header File
original =
@@ -4716,7 +4719,7 @@ void insertToSectionDeclFromDef(const QByteArray &section, int sectionIndex)
expected =
"class Foo\n"
"{\n"
- + section + ":\n" +
+ + sectionString +
" Foo();\n"
"@};\n";
testDocuments << QuickFixTestDocument::create("file.h", original, expected);