diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-05-19 13:06:49 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-05-19 13:14:07 +0200 |
commit | 86d5df063cda54c6eb2e32fb6496a23c8ef0de81 (patch) | |
tree | b66234ded883f33ae3d4fb9aa5ee703a6e352c9b /tests | |
parent | b0d093b0d7095d4b4d2de38dc965690c7b540d37 (diff) |
C++ indenter: Fix extra specifier in return type of func decl.
Like
struct Foo bar() { }
Change-Id: I946937c23d1660909757952a5a3bd400c4781826
Reviewed-on: http://codereview.qt.nokia.com/13
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp b/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp index 17bc24be036..d0c3ee811a0 100644 --- a/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp +++ b/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp @@ -91,6 +91,7 @@ private Q_SLOTS: void whitesmithsStyleSwitch(); void indentToNextToken(); void labels(); + void functionsWithExtraSpecifier(); }; struct Line { @@ -1178,6 +1179,19 @@ void tst_CodeFormatter::labels() checkIndent(data); } +void tst_CodeFormatter::functionsWithExtraSpecifier() +{ + QList<Line> data; + data << Line("extern void foo() {}") + << Line("struct Foo bar() {}") + << Line("enum Foo bar() {}") + << Line("namespace foo {") + << Line("}") + << Line("int a;") + ; + checkIndent(data); +} + QTEST_APPLESS_MAIN(tst_CodeFormatter) #include "tst_codeformatter.moc" |