Clarify tests

This commit is contained in:
Daniel Marjamäki 2019-06-22 07:50:43 +02:00
parent beea7fa8d2
commit 16bed07c60
1 changed files with 2 additions and 2 deletions

View File

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