calculation in sizeof: added two more ASSERT_EQUALS to guard against false positives

This commit is contained in:
Daniel Marjamäki 2010-08-07 10:12:39 +02:00
parent c395e51389
commit e7e86ef333
1 changed files with 6 additions and 0 deletions

View File

@ -2789,6 +2789,12 @@ private:
{
check("sizeof(a+b)");
ASSERT_EQUALS("[test.cpp:1]: (style) Found calculation inside sizeof()\n", errout.str());
check("sizeof(-a)");
ASSERT_EQUALS("", errout.str());
check("sizeof(void * const)");
ASSERT_EQUALS("", errout.str());
}
void emptyCatchBlock()