removeReduntantConditions : Added test case

This commit is contained in:
Daniel Marjamäki 2008-12-26 14:43:16 +00:00
parent b9494c8081
commit 9ae5c15e17
1 changed files with 7 additions and 0 deletions

View File

@ -125,6 +125,13 @@ private:
const char code2[] = " void f() { int a; bool use = true; { a=0; }int c=1; } ";
ASSERT_EQUALS( tok(code2), tok(code1) );
}
/* TODO: Uncomment and make this work
{
const char code1[] = " void f() { int a; bool use = true; if( bb ) a=0; else if( use ) a=1; else if( cc ) a=33; else { gg = 0; } int c=1; } ";
const char code2[] = " void f() { int a; bool use = true; if( bb ) {a=0;} else { a=1; } int c=1; } ";
ASSERT_EQUALS( tok(code2), tok(code1) );
}
*/
}
};