Add test for the consecutive braces simplification, thanks to thomasjfox's example.

This commit is contained in:
Edoardo Prezioso 2011-11-18 20:57:29 +01:00
parent 033fef36da
commit 44e348d018
1 changed files with 2 additions and 1 deletions

View File

@ -7503,6 +7503,7 @@ private:
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 ( ) { { scope_lock lock ; foo ( ) ; } { scope_lock lock ; bar ( ) ; } }", tok("void f () { {scope_lock lock; foo();} {scope_lock lock; bar();} }", true));
}
};