Test simplification of "delete a, b, c"
This commit is contained in:
parent
b637e70d63
commit
712b101862
|
@ -1799,6 +1799,16 @@ private:
|
||||||
ASSERT_EQUALS("void foo ( ) { char * a ; char * b ; delete a ; b ; }", tok(code));
|
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"
|
const char code[] = "void foo()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
|
@ -1809,6 +1819,17 @@ private:
|
||||||
ASSERT_EQUALS("void foo ( ) { char * a ; char * b ; if ( x ) { delete a ; b ; } }", tok(code));
|
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"
|
const char code[] = "void foo()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
|
|
Loading…
Reference in New Issue