Skip to content

Commit 16bed07

Browse files
committed
Clarify tests
1 parent beea7fa commit 16bed07

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/testother.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2849,12 +2849,12 @@ class TestOther : public TestFixture {
28492849

28502850
void suspiciousEqualityComparison() {
28512851
check("void foo(int c) {\n"
2852-
" if (c == 1) c == 0;\n"
2852+
" if (x) c == 0;\n"
28532853
"}");
28542854
ASSERT_EQUALS("[test.cpp:2]: (warning, inconclusive) Found suspicious equality comparison. Did you intend to assign a value instead?\n", errout.str());
28552855

28562856
check("void foo(int* c) {\n"
2857-
" if (*c == 1) *c == 0;\n"
2857+
" if (x) *c == 0;\n"
28582858
"}");
28592859
ASSERT_EQUALS("[test.cpp:2]: (warning, inconclusive) Found suspicious equality comparison. Did you intend to assign a value instead?\n", errout.str());
28602860

0 commit comments

Comments
 (0)