Tokenizer: Add testcase for 'delete a, a=0;'

This commit is contained in:
Dmitry-Me 2015-03-24 07:59:17 +01:00 committed by Daniel Marjamäki
parent ab97d8dd6f
commit 9a1b543c07
1 changed files with 8 additions and 0 deletions

View File

@ -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"