forked from qt-creator/qt-creator
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:
@@ -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"
|
||||
|
Reference in New Issue
Block a user