diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-06-01 11:10:57 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-06-01 11:14:50 +0200 |
commit | 794f29670129f428992e15d18146a083dc9fa4fd (patch) | |
tree | e6a1a34b750fd86fc5657d3cbf622762f6a5e48f /tests | |
parent | ca2f104f302c3497ab78d05742aa369e59db38fd (diff) | |
download | qt-creator-794f29670129f428992e15d18146a083dc9fa4fd.tar.gz |
C++ indenter: Fix multiple initializers.
Task-number: QTCREATORBUG-4993
Change-Id: I0f7d541eb7b26c37b8167e30e2949b6b939fe4b8
Reviewed-on: http://codereview.qt.nokia.com/297
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp b/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp index ab80877202..3df75d4f37 100644 --- a/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp +++ b/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp @@ -73,6 +73,7 @@ private Q_SLOTS: void bug1(); void bug2(); void bug3(); + void bug4(); void switch1(); void switch2(); void switch3(); @@ -778,6 +779,20 @@ void tst_CodeFormatter::bug3() checkIndent(data); } +void tst_CodeFormatter::bug4() +{ + QList<Line> data; + data << Line("void test()") + << Line("{") + << Line(" int a = 0, b = {0};") + << Line(" int a = {0}, b = {0};") + << Line(" int b;") + << Line("}") + << Line("int c;") + ; + checkIndent(data); +} + void tst_CodeFormatter::braceList() { QList<Line> data; |