forked from qt-creator/qt-creator
C++ indenter: Fix error recovery in function definitions.
Task-number: QTCREATORBUG-1517
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user