forked from qt-creator/qt-creator
C++ indenter: Fix for use of << and >> in parentheses.
Task-number: QTCREATORBUG-4076
This commit is contained in:
@@ -71,6 +71,7 @@ private Q_SLOTS:
|
||||
void braceList();
|
||||
void bug1();
|
||||
void bug2();
|
||||
void bug3();
|
||||
void switch1();
|
||||
void memberInitializer();
|
||||
void templates();
|
||||
@@ -669,6 +670,23 @@ void tst_CodeFormatter::bug2()
|
||||
checkIndent(data);
|
||||
}
|
||||
|
||||
void tst_CodeFormatter::bug3()
|
||||
{
|
||||
QList<Line> data;
|
||||
data << Line("class AutoAttack")
|
||||
<< Line("{")
|
||||
<< Line("public:")
|
||||
<< Line(" AutoAttack(unsigned delay, unsigned warmup)")
|
||||
<< Line(" ~ : mWarmup(warmup && warmup < delay ? warmup : delay >> 2)")
|
||||
<< Line(" {}")
|
||||
<< Line(" unsigned getWarmup() const { return mWarmup; }")
|
||||
<< Line("private:")
|
||||
<< Line(" unsigned mWarmup;")
|
||||
<< Line("}")
|
||||
;
|
||||
checkIndent(data);
|
||||
}
|
||||
|
||||
void tst_CodeFormatter::braceList()
|
||||
{
|
||||
QList<Line> data;
|
||||
|
||||
Reference in New Issue
Block a user