From 4c320571803b512e759b10ddb202ba07909afd6b Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Wed, 12 Aug 2009 02:06:41 +0700 Subject: [PATCH] Fixed ticket #541 (Wrong testcases produce unlogged error at Tokenizer::syntaxError) http://sourceforge.net/apps/trac/cppcheck/ticket/541 --- test/testautovariables.cpp | 2 +- test/testother.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testautovariables.cpp b/test/testautovariables.cpp index 42948a221..8445d6919 100644 --- a/test/testautovariables.cpp +++ b/test/testautovariables.cpp @@ -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()); } diff --git a/test/testother.cpp b/test/testother.cpp index 7f0b60a31..527989bb3 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -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()); }