Skip to content

Commit 544ec38

Browse files
1 parent b8b6be4 commit 544ec38

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

test/testcondition.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5482,6 +5482,13 @@ class TestCondition : public TestFixture {
54825482
" if (p=foo()){}\n"
54835483
"}");
54845484
ASSERT_EQUALS("", errout.str());
5485+
5486+
check("void f(uint32_t u) {\n" // #2490
5487+
" if ((u = 0x00000000) || (u = 0xffffffff)) {}\n"
5488+
"}\n");
5489+
ASSERT_EQUALS("[test.cpp:2]: (style) Condition 'u=0x00000000' is always false\n"
5490+
"[test.cpp:2]: (style) Condition 'u=0xffffffff' is always true\n",
5491+
errout.str());
54855492
}
54865493

54875494
void compareOutOfTypeRange() {

0 commit comments

Comments
 (0)