From 9b05850e97b1964a6ccaf59ac895d176f593be70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 23 Dec 2009 19:59:46 +0100 Subject: [PATCH] fixed unit testing --- lib/checkother.cpp | 2 +- test/testother.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 1bebcc605..d3b7cac76 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -1252,7 +1252,7 @@ private: return vartok->next(); } - if (Token::Match(tok.previous(), "[;{}] %var% (")) + if (Token::Match(&tok, "%var% (")) { // parse usage.. std::list var; diff --git a/test/testother.cpp b/test/testother.cpp index 554ecfe6d..f86abb7d6 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -1216,7 +1216,7 @@ private: " FILE *f;\n" " fflush(f);\n" "}\n"); - ASSERT_EQUALS("error", errout.str()); + ASSERT_EQUALS("[test.cpp:4]: (error) Uninitialized variable: f\n", errout.str()); // arrays.. checkUninitVar("void f()\n"