diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index a32bb276a..a23a70548 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -1799,6 +1799,16 @@ private: ASSERT_EQUALS("void foo ( ) { char * a ; char * b ; delete a ; b ; }", tok(code)); } + { + const char code[] = "void foo()\n" + "{\n" + " char *a, *b, *c;\n" + " delete a, b, c;\n" + "}\n"; + // delete a; b; c; would be better but this will do too + ASSERT_EQUALS("void foo ( ) { char * a ; char * b ; char * c ; delete a ; b , c ; }", tok(code)); + } + { const char code[] = "void foo()\n" "{\n" @@ -1809,6 +1819,17 @@ private: ASSERT_EQUALS("void foo ( ) { char * a ; char * b ; if ( x ) { delete a ; b ; } }", tok(code)); } + { + const char code[] = "void foo()\n" + "{\n" + " char *a, *b, *c;\n" + " if (x) \n" + " delete a, b, c;\n" + "}\n"; + // delete a; b; c; would be better but this will do too + ASSERT_EQUALS("void foo ( ) { char * a ; char * b ; char * c ; if ( x ) { delete a ; b , c ; } }", tok(code)); + } + { const char code[] = "void foo()\n" "{\n"