CppEditor: Fix a test

... such that it passes with both the built-in indenter and ClangFormat.
The former just indents relative to the previous line, while the latter
considers more context.

Change-Id: I6e837c307728a9d1add16d6eb81880d54bcc89d6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Christian Kandeler
2023-12-05 10:54:14 +01:00
parent 997f28347b
commit ee4493ffa4

View File

@@ -1737,12 +1737,12 @@ void QuickfixTest::testGeneric_data()
QTest::newRow("AddLocalDeclaration_QTCREATORBUG-26004") QTest::newRow("AddLocalDeclaration_QTCREATORBUG-26004")
<< CppQuickFixFactoryPtr(new AddDeclarationForUndeclaredIdentifier) << CppQuickFixFactoryPtr(new AddDeclarationForUndeclaredIdentifier)
<< _("void func() {\n" << _("void func() {\n"
" QStringList list;\n" " QStringList list;\n"
" @it = list.cbegin();\n" " @it = list.cbegin();\n"
"}\n") "}\n")
<< _("void func() {\n" << _("void func() {\n"
" QStringList list;\n" " QStringList list;\n"
" auto it = list.cbegin();\n" " auto it = list.cbegin();\n"
"}\n"); "}\n");
} }