From f2d56363d3a14146b2a9ed642b9cccc2702cda41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 6 Sep 2017 22:53:36 +0200 Subject: [PATCH] CheckCondition: Fix TODO assertion --- test/testcondition.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/testcondition.cpp b/test/testcondition.cpp index a4e0023a4..382ca246c 100644 --- a/test/testcondition.cpp +++ b/test/testcondition.cpp @@ -1813,13 +1813,14 @@ private: "}\n"); ASSERT_EQUALS("", errout.str()); - check("void C::f(const Tree &coreTree) {\n" + check("struct C { void f(const Tree &coreTree); };\n" + "void C::f(const Tree &coreTree) {\n" " if(!coreTree.build())\n" " return;\n" " coreTree.dostuff();\n" " if(!coreTree.build()) {}\n" "}\n"); - TODO_ASSERT_EQUALS("error", "", errout.str()); + ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:6]: (warning) Same condition '!coreTree.build()', second condition is always false\n", errout.str()); } // clarify conditions with = and comparison