Skip to content

Commit 03dc79f

Browse files
Update testcondition.cpp [skip ci]
1 parent 526ce1c commit 03dc79f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎test/testcondition.cpp‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5508,8 +5508,14 @@ class TestCondition : public TestFixture {
55085508
"void f() {\n"
55095509
" int (*p)() = g;\n"
55105510
" if (p == nullptr) {}\n"
5511+
" if (g == nullptr) {}\n"
5512+
" auto q = g;\n"
5513+
" if (q == nullptr) {}\n"
55115514
"};\n");
5512-
ASSERT_EQUALS("[test.cpp:4:11]: (style) Condition 'p==nullptr' is always false [knownConditionTrueFalse]\n", errout_str());
5515+
ASSERT_EQUALS("[test.cpp:4:11]: (style) Condition 'p==nullptr' is always false [knownConditionTrueFalse]\n"
5516+
"[test.cpp:5:11]: (style) Condition 'g==nullptr' is always false [knownConditionTrueFalse]\n"
5517+
"[test.cpp:7:11]: (style) Condition 'q==nullptr' is always false [knownConditionTrueFalse]\n",
5518+
errout_str());
55135519
}
55145520

55155521
void alwaysTrueContainer() {

0 commit comments

Comments
 (0)