From 5a158987cee43a858ddaa0e246af254fc2fc0b54 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 30 Sep 2013 11:21:28 -0700 Subject: [PATCH] Added todo testcase for false positive: Comparison of boolean with expression with an integer. --- test/testbool.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/testbool.cpp b/test/testbool.cpp index 096ab9631..3b27450ab 100644 --- a/test/testbool.cpp +++ b/test/testbool.cpp @@ -359,6 +359,11 @@ private: " }\n" "}"); ASSERT_EQUALS("", errout.str()); + + check("void f(int x, int y) {\n" + " return (!y == !x);\n" + "}"); + TODO_ASSERT_EQUALS("","[test.cpp:2]: (warning) Comparison of a boolean expression with an integer.\n", errout.str()); } void comparisonOfBoolExpressionWithInt3() {