fixed unit testing
This commit is contained in:
parent
ea51c3e098
commit
9b05850e97
|
@ -1252,7 +1252,7 @@ private:
|
||||||
return vartok->next();
|
return vartok->next();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Token::Match(tok.previous(), "[;{}] %var% ("))
|
if (Token::Match(&tok, "%var% ("))
|
||||||
{
|
{
|
||||||
// parse usage..
|
// parse usage..
|
||||||
std::list<const Token *> var;
|
std::list<const Token *> var;
|
||||||
|
|
|
@ -1216,7 +1216,7 @@ private:
|
||||||
" FILE *f;\n"
|
" FILE *f;\n"
|
||||||
" fflush(f);\n"
|
" fflush(f);\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("error", errout.str());
|
ASSERT_EQUALS("[test.cpp:4]: (error) Uninitialized variable: f\n", errout.str());
|
||||||
|
|
||||||
// arrays..
|
// arrays..
|
||||||
checkUninitVar("void f()\n"
|
checkUninitVar("void f()\n"
|
||||||
|
|
Loading…
Reference in New Issue