Skip to content

Commit fb48a7a

Browse files
Update testcondition.cpp
1 parent 51469d1 commit fb48a7a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

test/testcondition.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6231,6 +6231,12 @@ class TestCondition : public TestFixture {
62316231
"[test.cpp:14:9]: (style) Comparing expression of type 'const unsigned char' against value 255. Condition is always false. [compareValueOutOfTypeRangeError]\n"
62326232
"[test.cpp:17:9]: (style) Comparing expression of type 'const unsigned char' against value 255. Condition is always true. [compareValueOutOfTypeRangeError]\n",
62336233
errout_str());
6234+
6235+
check("void f(bool b) {\n" // #14037
6236+
" if (b != 2) {}\n"
6237+
"}\n", dinit(CheckOptions, $.s = &settingsUnix64));
6238+
ASSERT_EQUALS("[test.cpp:2:12:]: (style) Comparing expression of type 'bool' against value 2. Condition is always true. [compareValueOutOfTypeRangeError]\n",
6239+
errout_str());
62346240
}
62356241

62366242
void knownConditionCast() {

0 commit comments

Comments
 (0)