C++ indenter: Accept attributes in access specifiers.

Change-Id: Ie85b8264c9579e8c8312e30018280fb11f95edda
Reviewed-on: http://codereview.qt-project.org/6328
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
Sanity-Review: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
Christian Kamm
2011-10-10 14:37:41 +02:00
parent 6a988ee8ac
commit aa3d406faf
3 changed files with 34 additions and 1 deletions

View File

@@ -125,6 +125,7 @@ private Q_SLOTS:
void caseBody6();
void blockBraces1();
void functionDefaultArgument();
void attributeInAccessSpecifier();
};
struct Line {
@@ -1990,6 +1991,20 @@ void tst_CodeFormatter::functionDefaultArgument()
checkIndent(data);
}
void tst_CodeFormatter::attributeInAccessSpecifier()
{
QList<Line> data;
data << Line("class C {")
<< Line("public __attribute__((annotate(\"foo\"))):")
<< Line(" int a;")
<< Line("private __attribute__((annotate(\"foo\"))):")
<< Line(" int a;")
<< Line("};")
<< Line("int b;")
;
checkIndent(data);
}
QTEST_APPLESS_MAIN(tst_CodeFormatter)
#include "tst_codeformatter.moc"