Fixed ticket #541 (Wrong testcases produce unlogged error at Tokenizer::syntaxError)

http://sourceforge.net/apps/trac/cppcheck/ticket/541
This commit is contained in:
Slava Semushin 2009-08-12 02:06:41 +07:00
parent 6a7624054e
commit 4c32057180
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ private:
"int a;\n"
"char tmp[256];\n"
"free (tmp);\n"
"return 0;");
"}\n");
ASSERT_EQUALS(std::string("[test.cpp:5]: (error) Invalid deallocation\n"), errout.str());
}

View File

@ -553,7 +553,7 @@ private:
" abc = abc->next;\n"
" --a;\n"
" }\n"
" while (a > 0)\n"
" while (a > 0);\n"
"}\n");
ASSERT_EQUALS("", errout.str());
}