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>
case T_RBRACE: leave(true); continue;
case T_SEMICOLON: leave(); continue;
case T_RPAREN: leave(); continue;
+ case T_COMMA: leave(); continue;
default: enter(assign_open); continue;
} break;
case T_RBRACE: leave(true); continue;
case T_SEMICOLON: leave(); continue;
case T_RPAREN: leave(); continue;
+ case T_COMMA: leave(); continue;
default: tryExpression(); break;
} break;
void bug1();
void bug2();
void bug3();
+ void bug4();
void switch1();
void switch2();
void switch3();
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;