Add test for the consecutive braces simplification, thanks to thomasjfox's example.
This commit is contained in:
parent
033fef36da
commit
44e348d018
|
@ -7502,7 +7502,8 @@ private:
|
|||
void consecutiveBraces() {
|
||||
ASSERT_EQUALS("void f ( ) { }", tok("void f(){{}}", true));
|
||||
ASSERT_EQUALS("void f ( ) { }", tok("void f(){{{}}}", true));
|
||||
ASSERT_EQUALS("void f ( ) { for ( ; ; ) { } }", tok("void f(){for(;;){}}", true));
|
||||
ASSERT_EQUALS("void f ( ) { for ( ; ; ) { } }", tok("void f () { for(;;){} }", true));
|
||||
ASSERT_EQUALS("void f ( ) { { scope_lock lock ; foo ( ) ; } { scope_lock lock ; bar ( ) ; } }", tok("void f () { {scope_lock lock; foo();} {scope_lock lock; bar();} }", true));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue