diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index a254de3b6..b39a1628d 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -1844,6 +1844,14 @@ private: ASSERT_EQUALS("void foo ( ) { delete a ; a = 0 ; }", tok(code)); } + { + const char code[] = "void foo()\n" + "{\n" + " if( x ) delete a, a = 0;\n" + "}\n"; + ASSERT_EQUALS("void foo ( ) { if ( x ) { delete a ; a = 0 ; } }", tok(code)); + } + { const char code[] = "void f()\n" "{\n"