C++ indenter: Fix error recovery in function definitions.

Task-number: QTCREATORBUG-1517
This commit is contained in:
Christian Kamm
2010-09-24 15:58:23 +02:00
parent 1b46f422ce
commit 17e0886c69
2 changed files with 16 additions and 2 deletions

View File

@@ -49,6 +49,7 @@ private Q_SLOTS:
void nestedInitializer();
void forStatement();
void templateSingleline();
void macrosNoSemicolon2();
};
struct Line {
@@ -952,6 +953,19 @@ void tst_CodeFormatter::templateSingleline()
checkIndent(data);
}
void tst_CodeFormatter::macrosNoSemicolon2()
{
QList<Line> data;
data
<< Line("FOO(ABC)")
<< Line("{")
<< Line(" BAR(FOO)")
<< Line("}")
<< Line("int i;")
;
checkIndent(data);
}
QTEST_APPLESS_MAIN(tst_CodeFormatter)
#include "tst_codeformatter.moc"