diff --git a/test/testother.cpp b/test/testother.cpp index 1031db170..6d4865fd6 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -2849,12 +2849,12 @@ private: void suspiciousEqualityComparison() { check("void foo(int c) {\n" - " if (c == 1) c == 0;\n" + " if (x) c == 0;\n" "}"); ASSERT_EQUALS("[test.cpp:2]: (warning, inconclusive) Found suspicious equality comparison. Did you intend to assign a value instead?\n", errout.str()); check("void foo(int* c) {\n" - " if (*c == 1) *c == 0;\n" + " if (x) *c == 0;\n" "}"); ASSERT_EQUALS("[test.cpp:2]: (warning, inconclusive) Found suspicious equality comparison. Did you intend to assign a value instead?\n", errout.str());