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()); }